diff options
author | cvs2svn <> | 2002-02-28 16:50:42 +0300 |
---|---|---|
committer | cvs2svn <> | 2002-02-28 16:50:42 +0300 |
commit | 9ccf7d7a2bedae22e20a07e447a5123bb48318d5 (patch) | |
tree | 46ab57eaa486d43f88afb6012429f88086b81077 /winsup/utils | |
parent | 062401c9b4bf8a203d7e694194307d84e351fce0 (diff) |
This commit was manufactured by cvs2svn to create tag 'predaemon'.predaemon
Sprout from master 2002-02-28 13:50:41 UTC Robert Collins <rbtcollins@hotmail.com> '2002-02-28 Robert Collins <rbtcollins@hotmail.com>'
Delete:
COPYING
COPYING.LIB
COPYING.NEWLIB
ChangeLog
MAINTAINERS
Makefile.in
README
README-maintainer-mode
config-ml.in
config.guess
config.if
config.sub
config/ChangeLog
config/acinclude.m4
config/mh-a68bsd
config/mh-aix386
config/mh-apollo68
config/mh-armpic
config/mh-cxux
config/mh-cygwin
config/mh-decstation
config/mh-delta88
config/mh-dgux
config/mh-dgux386
config/mh-djgpp
config/mh-elfalphapic
config/mh-hp300
config/mh-hpux
config/mh-hpux8
config/mh-i370pic
config/mh-ia64pic
config/mh-interix
config/mh-irix4
config/mh-irix5
config/mh-irix6
config/mh-lynxos
config/mh-lynxrs6k
config/mh-m68kpic
config/mh-mingw32
config/mh-ncr3000
config/mh-ncrsvr43
config/mh-necv4
config/mh-openedition
config/mh-papic
config/mh-ppcpic
config/mh-riscos
config/mh-s390pic
config/mh-sco
config/mh-solaris
config/mh-sparcpic
config/mh-sun3
config/mh-sysv
config/mh-sysv4
config/mh-sysv5
config/mh-vaxult2
config/mh-x86pic
config/mpw-mh-mpw
config/mpw/ChangeLog
config/mpw/MoveIfChange
config/mpw/README
config/mpw/forward-include
config/mpw/g-mpw-make.sed
config/mpw/mpw-touch
config/mpw/mpw-true
config/mpw/null-command
config/mpw/open-brace
config/mpw/tr-7to8-src
config/mpw/true
config/mt-aix43
config/mt-armpic
config/mt-d30v
config/mt-elfalphapic
config/mt-i370pic
config/mt-ia64pic
config/mt-linux
config/mt-m68kpic
config/mt-netware
config/mt-ospace
config/mt-papic
config/mt-ppcpic
config/mt-s390pic
config/mt-sparcpic
config/mt-v810
config/mt-wince
config/mt-x86pic
configure
configure.in
djunpack.bat
etc/ChangeLog
etc/Makefile.in
etc/add-log.el
etc/add-log.vi
etc/configbuild.ein
etc/configbuild.fig
etc/configbuild.jin
etc/configbuild.tin
etc/configdev.ein
etc/configdev.fig
etc/configdev.jin
etc/configdev.tin
etc/configure
etc/configure.in
etc/configure.texi
etc/fdl.texi
etc/make-stds.texi
etc/standards.texi
etc/texi2pod.pl
gettext.m4
include/COPYING
include/ChangeLog
include/MAINTAINERS
include/alloca-conf.h
include/ansidecl.h
include/aout/ChangeLog
include/aout/adobe.h
include/aout/aout64.h
include/aout/ar.h
include/aout/dynix3.h
include/aout/encap.h
include/aout/host.h
include/aout/hp.h
include/aout/hp300hpux.h
include/aout/hppa.h
include/aout/ranlib.h
include/aout/reloc.h
include/aout/stab.def
include/aout/stab_gnu.h
include/aout/sun4.h
include/bfdlink.h
include/bin-bugs.h
include/bout.h
include/callback.h
include/coff/ChangeLog
include/coff/a29k.h
include/coff/alpha.h
include/coff/apollo.h
include/coff/arm.h
include/coff/aux-coff.h
include/coff/ecoff.h
include/coff/external.h
include/coff/go32exe.h
include/coff/h8300.h
include/coff/h8500.h
include/coff/i386.h
include/coff/i860.h
include/coff/i960.h
include/coff/ia64.h
include/coff/internal.h
include/coff/m68k.h
include/coff/m88k.h
include/coff/mcore.h
include/coff/mips.h
include/coff/mipspe.h
include/coff/or32.h
include/coff/pe.h
include/coff/powerpc.h
include/coff/rs6000.h
include/coff/rs6k64.h
include/coff/sh.h
include/coff/sparc.h
include/coff/sym.h
include/coff/symconst.h
include/coff/ti.h
include/coff/tic30.h
include/coff/tic54x.h
include/coff/tic80.h
include/coff/w65.h
include/coff/we32k.h
include/coff/xcoff.h
include/coff/z8k.h
include/demangle.h
include/dis-asm.h
include/dyn-string.h
include/elf/ChangeLog
include/elf/alpha.h
include/elf/arc.h
include/elf/arm.h
include/elf/avr.h
include/elf/common.h
include/elf/cris.h
include/elf/d10v.h
include/elf/d30v.h
include/elf/dwarf.h
include/elf/dwarf2.h
include/elf/external.h
include/elf/fr30.h
include/elf/h8.h
include/elf/hppa.h
include/elf/i370.h
include/elf/i386.h
include/elf/i860.h
include/elf/i960.h
include/elf/ia64.h
include/elf/internal.h
include/elf/m32r.h
include/elf/m68hc11.h
include/elf/m68k.h
include/elf/mcore.h
include/elf/mips.h
include/elf/mmix.h
include/elf/mn10200.h
include/elf/mn10300.h
include/elf/openrisc.h
include/elf/or32.h
include/elf/pj.h
include/elf/ppc.h
include/elf/reloc-macros.h
include/elf/s390.h
include/elf/sh.h
include/elf/sparc.h
include/elf/v850.h
include/elf/x86-64.h
include/elf/xstormy16.h
include/fibheap.h
include/filenames.h
include/floatformat.h
include/fnmatch.h
include/fopen-bin.h
include/fopen-same.h
include/fopen-vms.h
include/gdbm.h
include/getopt.h
include/hashtab.h
include/hp-symtab.h
include/ieee.h
include/libiberty.h
include/md5.h
include/mpw/ChangeLog
include/mpw/README
include/mpw/dir.h
include/mpw/dirent.h
include/mpw/fcntl.h
include/mpw/grp.h
include/mpw/mpw.h
include/mpw/pwd.h
include/mpw/spin.h
include/mpw/stat.h
include/mpw/sys/file.h
include/mpw/sys/param.h
include/mpw/sys/resource.h
include/mpw/sys/stat.h
include/mpw/sys/time.h
include/mpw/sys/types.h
include/mpw/utime.h
include/mpw/varargs.h
include/nlm/ChangeLog
include/nlm/alpha-ext.h
include/nlm/common.h
include/nlm/external.h
include/nlm/i386-ext.h
include/nlm/internal.h
include/nlm/ppc-ext.h
include/nlm/sparc32-ext.h
include/oasys.h
include/objalloc.h
include/obstack.h
include/opcode/ChangeLog
include/opcode/a29k.h
include/opcode/alpha.h
include/opcode/arc.h
include/opcode/arm.h
include/opcode/avr.h
include/opcode/cgen.h
include/opcode/convex.h
include/opcode/cris.h
include/opcode/d10v.h
include/opcode/d30v.h
include/opcode/h8300.h
include/opcode/hppa.h
include/opcode/i370.h
include/opcode/i386.h
include/opcode/i860.h
include/opcode/i960.h
include/opcode/ia64.h
include/opcode/m68hc11.h
include/opcode/m68k.h
include/opcode/m88k.h
include/opcode/mips.h
include/opcode/mmix.h
include/opcode/mn10200.h
include/opcode/mn10300.h
include/opcode/np1.h
include/opcode/ns32k.h
include/opcode/or32.h
include/opcode/pdp11.h
include/opcode/pj.h
include/opcode/pn.h
include/opcode/ppc.h
include/opcode/pyr.h
include/opcode/s390.h
include/opcode/sparc.h
include/opcode/tahoe.h
include/opcode/tic30.h
include/opcode/tic54x.h
include/opcode/tic80.h
include/opcode/v850.h
include/opcode/vax.h
include/os9k.h
include/partition.h
include/progress.h
include/regs/ChangeLog
include/remote-sim.h
include/safe-ctype.h
include/sim-d10v.h
include/sort.h
include/splay-tree.h
include/symcat.h
include/ternary.h
include/xregex.h
include/xregex2.h
install-sh
libgloss/ChangeLog
libgloss/Makefile.in
libgloss/README
libgloss/arm/Makefile.in
libgloss/arm/coff-iq80310.specs
libgloss/arm/coff-redboot.ld
libgloss/arm/coff-redboot.specs
libgloss/arm/configure
libgloss/arm/configure.in
libgloss/arm/elf-iq80310.specs
libgloss/arm/elf-redboot.ld
libgloss/arm/elf-redboot.specs
libgloss/arm/redboot-crt0.S
libgloss/arm/redboot-syscalls.c
libgloss/close.c
libgloss/config/default.mh
libgloss/config/default.mt
libgloss/config/dos.mh
libgloss/config/mips.mt
libgloss/config/mn10200.mt
libgloss/config/mn10300.mt
libgloss/config/ppc.mh
libgloss/configure
libgloss/configure.in
libgloss/d30v/Makefile.in
libgloss/d30v/configure
libgloss/d30v/configure.in
libgloss/d30v/crt0.S
libgloss/d30v/inbyte.c
libgloss/d30v/outbyte.c
libgloss/d30v/syscalls.c
libgloss/debug.c
libgloss/debug.h
libgloss/doc/Makefile.in
libgloss/doc/configure
libgloss/doc/configure.in
libgloss/doc/porting.texi
libgloss/fr30/Makefile.in
libgloss/fr30/configure
libgloss/fr30/configure.in
libgloss/fr30/crt0.s
libgloss/fr30/syscalls.c
libgloss/fstat.c
libgloss/getpid.c
libgloss/glue.h
libgloss/hp74x/Makefile.in
libgloss/hp74x/README
libgloss/hp74x/checksum.c
libgloss/hp74x/configure
libgloss/hp74x/configure.in
libgloss/hp74x/crt0.s
libgloss/hp74x/debugger.h
libgloss/hp74x/debugger.s
libgloss/hp74x/diagnose.h
libgloss/hp74x/hppa-defs.h
libgloss/hp74x/hppa.ld
libgloss/hp74x/io.c
libgloss/hp74x/iva_table.h
libgloss/hp74x/iva_table.s
libgloss/hp74x/pa_stub.c
libgloss/hp74x/test.c
libgloss/i386/Makefile.in
libgloss/i386/configure
libgloss/i386/configure.in
libgloss/i386/cygmon-crt0.S
libgloss/i386/cygmon-gmon.c
libgloss/i386/cygmon-gmon.h
libgloss/i386/cygmon-salib.c
libgloss/i386/cygmon-syscall.h
libgloss/i386/cygmon.ld
libgloss/i960/Makefile.in
libgloss/i960/asm.h
libgloss/i960/configure
libgloss/i960/configure.in
libgloss/i960/crt0.c
libgloss/i960/mon-read.c
libgloss/i960/mon-syscalls.S
libgloss/i960/mon-write.c
libgloss/i960/mon960.c
libgloss/i960/mon960.ld
libgloss/i960/syscall.h
libgloss/isatty.c
libgloss/kill.c
libgloss/libnosys/Makefile.in
libgloss/libnosys/acconfig.h
libgloss/libnosys/close.c
libgloss/libnosys/config.h.in
libgloss/libnosys/configure
libgloss/libnosys/configure.in
libgloss/libnosys/environ.c
libgloss/libnosys/execve.c
libgloss/libnosys/fork.c
libgloss/libnosys/fstat.c
libgloss/libnosys/getpid.c
libgloss/libnosys/gettod.c
libgloss/libnosys/isatty.c
libgloss/libnosys/kill.c
libgloss/libnosys/link.c
libgloss/libnosys/lseek.c
libgloss/libnosys/open.c
libgloss/libnosys/read.c
libgloss/libnosys/sbrk.c
libgloss/libnosys/stat.c
libgloss/libnosys/times.c
libgloss/libnosys/unlink.c
libgloss/libnosys/wait.c
libgloss/libnosys/warning.h
libgloss/libnosys/write.c
libgloss/lseek.c
libgloss/m32r/Makefile.in
libgloss/m32r/chmod.c
libgloss/m32r/close.c
libgloss/m32r/configure
libgloss/m32r/configure.in
libgloss/m32r/crt0.S
libgloss/m32r/eit.h
libgloss/m32r/eva-stub.ld
libgloss/m32r/eva.ld
libgloss/m32r/exit.c
libgloss/m32r/fstat.c
libgloss/m32r/getpid.c
libgloss/m32r/isatty.c
libgloss/m32r/kill.c
libgloss/m32r/lseek.c
libgloss/m32r/m32r-lib.c
libgloss/m32r/mon.specs
libgloss/m32r/open.c
libgloss/m32r/raise.c
libgloss/m32r/read.c
libgloss/m32r/sbrk.c
libgloss/m32r/stat.c
libgloss/m32r/trap0.S
libgloss/m32r/trapmon0.c
libgloss/m32r/unlink.c
libgloss/m32r/utime.c
libgloss/m32r/write.c
libgloss/m68k/Makefile.in
libgloss/m68k/README
libgloss/m68k/asm.h
libgloss/m68k/bcc.ld
libgloss/m68k/configure
libgloss/m68k/configure.in
libgloss/m68k/cpu32bug.S
libgloss/m68k/cpu32bug.h
libgloss/m68k/crt0.S
libgloss/m68k/dbug-exit.S
libgloss/m68k/dbug-inbyte.S
libgloss/m68k/dbug-outbyte.S
libgloss/m68k/dtor.C
libgloss/m68k/idp-inbyte.c
libgloss/m68k/idp-outbyte.c
libgloss/m68k/idp.ld
libgloss/m68k/idpgdb.ld
libgloss/m68k/leds.c
libgloss/m68k/leds.h
libgloss/m68k/mc68681reg.h
libgloss/m68k/mc68ec.c
libgloss/m68k/mvme-stub.c
libgloss/m68k/mvme.S
libgloss/m68k/mvme135-asm.S
libgloss/m68k/mvme135.ld
libgloss/m68k/mvme162.ld
libgloss/m68k/mvme162lx-asm.S
libgloss/m68k/sbc5204.ld
libgloss/m68k/sbc5206.ld
libgloss/m68k/sim-abort.c
libgloss/m68k/sim-crt0.S
libgloss/m68k/sim-errno.c
libgloss/m68k/sim-funcs.c
libgloss/m68k/sim-inbyte.c
libgloss/m68k/sim-print.c
libgloss/m68k/sim-sbrk.c
libgloss/m68k/sim.ld
libgloss/m68k/simulator.S
libgloss/m68k/test.c
libgloss/mcore/Makefile.in
libgloss/mcore/close.c
libgloss/mcore/cmb-exit.c
libgloss/mcore/cmb-inbyte.c
libgloss/mcore/cmb-outbyte.c
libgloss/mcore/configure
libgloss/mcore/configure.in
libgloss/mcore/crt0.S
libgloss/mcore/elf-cmb.ld
libgloss/mcore/elf-cmb.specs
libgloss/mcore/fstat.c
libgloss/mcore/getpid.c
libgloss/mcore/kill.c
libgloss/mcore/lseek.c
libgloss/mcore/open.c
libgloss/mcore/pe-cmb.ld
libgloss/mcore/pe-cmb.specs
libgloss/mcore/print.c
libgloss/mcore/putnum.c
libgloss/mcore/raise.c
libgloss/mcore/read.c
libgloss/mcore/sbrk.c
libgloss/mcore/stat.c
libgloss/mcore/syscalls.S
libgloss/mcore/unlink.c
libgloss/mcore/write.c
libgloss/mips/Makefile.in
libgloss/mips/array-io.c
libgloss/mips/array.ld
libgloss/mips/cma101.c
libgloss/mips/configure
libgloss/mips/configure.in
libgloss/mips/crt0.S
libgloss/mips/ddb-kseg0.ld
libgloss/mips/ddb.ld
libgloss/mips/dtor.C
libgloss/mips/dve.ld
libgloss/mips/dvemon.c
libgloss/mips/entry.S
libgloss/mips/idt.ld
libgloss/mips/idt32.ld
libgloss/mips/idt64.ld
libgloss/mips/idtecoff.ld
libgloss/mips/idtmon.S
libgloss/mips/jmr3904-io.c
libgloss/mips/jmr3904app-java.ld
libgloss/mips/jmr3904app.ld
libgloss/mips/jmr3904dram-java.ld
libgloss/mips/jmr3904dram.ld
libgloss/mips/lsi.ld
libgloss/mips/lsi33k-stub.c
libgloss/mips/lsi33k-stub.h
libgloss/mips/lsipmon.S
libgloss/mips/nullmon.c
libgloss/mips/nullmon.ld
libgloss/mips/pmon.S
libgloss/mips/pmon.ld
libgloss/mips/regs.S
libgloss/mips/syscalls.c
libgloss/mips/test.c
libgloss/mips/vr4300.S
libgloss/mips/vr5xxx.S
libgloss/mn10200/Makefile.in
libgloss/mn10200/_exit.c
libgloss/mn10200/access.c
libgloss/mn10200/chmod.c
libgloss/mn10200/chown.c
libgloss/mn10200/close.c
libgloss/mn10200/configure
libgloss/mn10200/configure.in
libgloss/mn10200/creat.c
libgloss/mn10200/crt0.S
libgloss/mn10200/crt1.c
libgloss/mn10200/eval.ld
libgloss/mn10200/execv.c
libgloss/mn10200/execve.c
libgloss/mn10200/fork.c
libgloss/mn10200/fstat.c
libgloss/mn10200/getpid.c
libgloss/mn10200/gettime.c
libgloss/mn10200/isatty.c
libgloss/mn10200/kill.c
libgloss/mn10200/lseek.c
libgloss/mn10200/open.c
libgloss/mn10200/pipe.c
libgloss/mn10200/read.c
libgloss/mn10200/sbrk.c
libgloss/mn10200/sim.ld
libgloss/mn10200/stat.c
libgloss/mn10200/test.c
libgloss/mn10200/time.c
libgloss/mn10200/times.c
libgloss/mn10200/trap.S
libgloss/mn10200/trap.h
libgloss/mn10200/unlink.c
libgloss/mn10200/utime.c
libgloss/mn10200/wait.c
libgloss/mn10200/write.c
libgloss/mn10300/Makefile.in
libgloss/mn10300/_exit.c
libgloss/mn10300/access.c
libgloss/mn10300/chmod.c
libgloss/mn10300/chown.c
libgloss/mn10300/close.c
libgloss/mn10300/configure
libgloss/mn10300/configure.in
libgloss/mn10300/creat.c
libgloss/mn10300/crt0-eval.S
libgloss/mn10300/crt0.S
libgloss/mn10300/crt0_cygmon.S
libgloss/mn10300/crt0_redboot.S
libgloss/mn10300/crt1.c
libgloss/mn10300/cygmon.c
libgloss/mn10300/eval.ld
libgloss/mn10300/execv.c
libgloss/mn10300/execve.c
libgloss/mn10300/fork.c
libgloss/mn10300/fstat.c
libgloss/mn10300/getpid.c
libgloss/mn10300/gettime.c
libgloss/mn10300/isatty.c
libgloss/mn10300/kill.c
libgloss/mn10300/lseek.c
libgloss/mn10300/open.c
libgloss/mn10300/pipe.c
libgloss/mn10300/read.c
libgloss/mn10300/sbrk.c
libgloss/mn10300/sim.ld
libgloss/mn10300/stat.c
libgloss/mn10300/test.c
libgloss/mn10300/time.c
libgloss/mn10300/times.c
libgloss/mn10300/trap.S
libgloss/mn10300/trap.h
libgloss/mn10300/unlink.c
libgloss/mn10300/utime.c
libgloss/mn10300/wait.c
libgloss/mn10300/write.c
libgloss/open.c
libgloss/pa/Makefile.in
libgloss/pa/README
libgloss/pa/configure
libgloss/pa/configure.in
libgloss/pa/crt0.S
libgloss/pa/hp-milli.s
libgloss/pa/op50n-io.S
libgloss/pa/op50n.h
libgloss/pa/op50n.ld
libgloss/pa/op50nled.c
libgloss/pa/setjmp.S
libgloss/pa/test.c
libgloss/pa/w89k-io.c
libgloss/pa/w89k.h
libgloss/pa/w89k.ld
libgloss/print.c
libgloss/putnum.c
libgloss/read.c
libgloss/rs6000/Makefile.in
libgloss/rs6000/ads-exit.S
libgloss/rs6000/ads-io.c
libgloss/rs6000/ads.ld
libgloss/rs6000/configure
libgloss/rs6000/configure.in
libgloss/rs6000/crt0.S
libgloss/rs6000/mbx-exit.c
libgloss/rs6000/mbx-inbyte.c
libgloss/rs6000/mbx-outbyte.c
libgloss/rs6000/mbx-print.c
libgloss/rs6000/mbx.ld
libgloss/rs6000/mbx.specs
libgloss/rs6000/mcount.S
libgloss/rs6000/mvme-errno.c
libgloss/rs6000/mvme-exit.S
libgloss/rs6000/mvme-inbyte.S
libgloss/rs6000/mvme-outbyte.S
libgloss/rs6000/mvme-print.c
libgloss/rs6000/mvme-read.c
libgloss/rs6000/sim-abort.c
libgloss/rs6000/sim-crt0.S
libgloss/rs6000/sim-errno.c
libgloss/rs6000/sim-inbyte.c
libgloss/rs6000/sim-print.c
libgloss/rs6000/sim-sbrk.c
libgloss/rs6000/simulator.S
libgloss/rs6000/sol-cfuncs.c
libgloss/rs6000/sol-syscall.S
libgloss/rs6000/test.c
libgloss/rs6000/yellowknife.ld
libgloss/sbrk.c
libgloss/sh/sh1lcevb.ld
libgloss/sh/sh2lcevb.ld
libgloss/sh/sh3bb.ld
libgloss/sh/sh3lcevb.ld
libgloss/sparc/Makefile.in
libgloss/sparc/asm.h
libgloss/sparc/cache.c
libgloss/sparc/configure
libgloss/sparc/configure.in
libgloss/sparc/crt0-701.S
libgloss/sparc/crt0.S
libgloss/sparc/cygmon-crt0.S
libgloss/sparc/cygmon-salib.c
libgloss/sparc/cygmon-sparc64-ld.src
libgloss/sparc/cygmon.ld.src
libgloss/sparc/dtor.C
libgloss/sparc/elfsim.ld
libgloss/sparc/erc32-crt0.S
libgloss/sparc/erc32-io.c
libgloss/sparc/erc32-stub.c
libgloss/sparc/erc32.ld
libgloss/sparc/ex930.ld
libgloss/sparc/ex931.ld
libgloss/sparc/ex934.ld
libgloss/sparc/fixctors.c
libgloss/sparc/libsys/Makefile.in
libgloss/sparc/libsys/_exit.S
libgloss/sparc/libsys/cerror.S
libgloss/sparc/libsys/configure
libgloss/sparc/libsys/configure.in
libgloss/sparc/libsys/isatty.c
libgloss/sparc/libsys/libsys-crt0.S
libgloss/sparc/libsys/sbrk.S
libgloss/sparc/libsys/syscall.h
libgloss/sparc/libsys/syscallasm.h
libgloss/sparc/libsys/template.S
libgloss/sparc/libsys/template_r.S
libgloss/sparc/salib-701.c
libgloss/sparc/salib.c
libgloss/sparc/slite.h
libgloss/sparc/sparc-stub.c
libgloss/sparc/sparc86x.ld
libgloss/sparc/sparcl-stub.c
libgloss/sparc/sparclet-stub.c
libgloss/sparc/sparclite.h
libgloss/sparc/sysc-701.c
libgloss/sparc/syscalls.c
libgloss/sparc/test.c
libgloss/sparc/traps.S
libgloss/sparc/tsc701.ld
libgloss/stat.c
libgloss/syscall.h
libgloss/testsuite/Makefile.in
libgloss/testsuite/config/hppa.mt
libgloss/testsuite/config/m68k.mt
libgloss/testsuite/config/mips.mt
libgloss/testsuite/config/support.c
libgloss/testsuite/configure.in
libgloss/testsuite/lib/libgloss.exp
libgloss/testsuite/libgloss.all/.gdbinit
libgloss/testsuite/libgloss.all/Makefile.in
libgloss/testsuite/libgloss.all/array.c
libgloss/testsuite/libgloss.all/configure.in
libgloss/testsuite/libgloss.all/div.c
libgloss/testsuite/libgloss.all/double.c
libgloss/testsuite/libgloss.all/float.c
libgloss/testsuite/libgloss.all/func.c
libgloss/testsuite/libgloss.all/io.c
libgloss/testsuite/libgloss.all/math.c
libgloss/testsuite/libgloss.all/memory.c
libgloss/testsuite/libgloss.all/misc.c
libgloss/testsuite/libgloss.all/printf.c
libgloss/testsuite/libgloss.all/struct.c
libgloss/testsuite/libgloss.all/varargs.c
libgloss/testsuite/libgloss.all/varargs2.c
libgloss/unlink.c
libgloss/v850/sys/syscall.h
libgloss/wince/Makefile.am
libgloss/wince/Makefile.in
libgloss/wince/aclocal.m4
libgloss/wince/configure
libgloss/wince/configure.in
libgloss/write.c
libgloss/xstormy16/Makefile.in
libgloss/xstormy16/close.c
libgloss/xstormy16/configure
libgloss/xstormy16/configure.in
libgloss/xstormy16/crt0.s
libgloss/xstormy16/crt0_stub.s
libgloss/xstormy16/crti.s
libgloss/xstormy16/crtn.s
libgloss/xstormy16/eva_app.c
libgloss/xstormy16/eva_app.ld
libgloss/xstormy16/eva_stub.ld
libgloss/xstormy16/fstat.c
libgloss/xstormy16/getpid.c
libgloss/xstormy16/kill.c
libgloss/xstormy16/lseek.c
libgloss/xstormy16/open.c
libgloss/xstormy16/sim_high.ld
libgloss/xstormy16/sim_malloc_start.s
libgloss/xstormy16/stat.c
libgloss/xstormy16/syscalls.S
libgloss/xstormy16/syscalls.m4
libgloss/xstormy16/unlink.c
libgloss/xstormy16/xstormy16_stub.c
libtool.m4
ltcf-c.sh
ltcf-cxx.sh
ltcf-gcj.sh
ltconfig
ltmain.sh
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
mpw-README
mpw-build.in
mpw-config.in
mpw-configure
mpw-install
newlib/ChangeLog
newlib/MAINTAINERS
newlib/Makefile.am
newlib/Makefile.in
newlib/Makefile.shared
newlib/NEWS
newlib/README
newlib/acinclude.m4
newlib/aclocal.m4
newlib/configure
newlib/configure.host
newlib/configure.in
newlib/doc/Makefile.am
newlib/doc/Makefile.in
newlib/doc/aclocal.m4
newlib/doc/ansidecl.h
newlib/doc/configure
newlib/doc/configure.in
newlib/doc/doc.str
newlib/doc/makedoc.c
newlib/libc/Makefile.am
newlib/libc/Makefile.in
newlib/libc/aclocal.m4
newlib/libc/configure
newlib/libc/configure.in
newlib/libc/ctype/Makefile.am
newlib/libc/ctype/Makefile.in
newlib/libc/ctype/_tolower.c
newlib/libc/ctype/_toupper.c
newlib/libc/ctype/ctype.tex
newlib/libc/ctype/ctype_.c
newlib/libc/ctype/isalnum.c
newlib/libc/ctype/isalpha.c
newlib/libc/ctype/isascii.c
newlib/libc/ctype/iscntrl.c
newlib/libc/ctype/isdigit.c
newlib/libc/ctype/islower.c
newlib/libc/ctype/isprint.c
newlib/libc/ctype/ispunct.c
newlib/libc/ctype/isspace.c
newlib/libc/ctype/isupper.c
newlib/libc/ctype/isxdigit.c
newlib/libc/ctype/toascii.c
newlib/libc/ctype/tolower.c
newlib/libc/ctype/toupper.c
newlib/libc/errno/Makefile.am
newlib/libc/errno/Makefile.in
newlib/libc/errno/errno.c
newlib/libc/include/_ansi.h
newlib/libc/include/_syslist.h
newlib/libc/include/alloca.h
newlib/libc/include/ar.h
newlib/libc/include/assert.h
newlib/libc/include/ctype.h
newlib/libc/include/dirent.h
newlib/libc/include/errno.h
newlib/libc/include/fastmath.h
newlib/libc/include/fcntl.h
newlib/libc/include/grp.h
newlib/libc/include/ieeefp.h
newlib/libc/include/locale.h
newlib/libc/include/machine/ansi.h
newlib/libc/include/machine/fastmath.h
newlib/libc/include/machine/ieeefp.h
newlib/libc/include/machine/setjmp-dj.h
newlib/libc/include/machine/setjmp.h
newlib/libc/include/machine/time.h
newlib/libc/include/machine/types.h
newlib/libc/include/malloc.h
newlib/libc/include/math.h
newlib/libc/include/paths.h
newlib/libc/include/process.h
newlib/libc/include/pthread.h
newlib/libc/include/pwd.h
newlib/libc/include/reent.h
newlib/libc/include/regdef.h
newlib/libc/include/setjmp.h
newlib/libc/include/signal.h
newlib/libc/include/stdio.h
newlib/libc/include/stdlib.h
newlib/libc/include/string.h
newlib/libc/include/sys/_types.h
newlib/libc/include/sys/config.h
newlib/libc/include/sys/dirent.h
newlib/libc/include/sys/errno.h
newlib/libc/include/sys/fcntl.h
newlib/libc/include/sys/features.h
newlib/libc/include/sys/file.h
newlib/libc/include/sys/param.h
newlib/libc/include/sys/reent.h
newlib/libc/include/sys/resource.h
newlib/libc/include/sys/sched.h
newlib/libc/include/sys/signal.h
newlib/libc/include/sys/stat-dj.h
newlib/libc/include/sys/stat.h
newlib/libc/include/sys/time.h
newlib/libc/include/sys/timeb.h
newlib/libc/include/sys/times.h
newlib/libc/include/sys/types.h
newlib/libc/include/sys/unistd.h
newlib/libc/include/sys/utime.h
newlib/libc/include/sys/wait.h
newlib/libc/include/termios.h
newlib/libc/include/time.h
newlib/libc/include/unctrl.h
newlib/libc/include/unistd.h
newlib/libc/include/utime.h
newlib/libc/include/utmp.h
newlib/libc/libc.texinfo
newlib/libc/locale/Makefile.am
newlib/libc/locale/Makefile.in
newlib/libc/locale/locale.c
newlib/libc/locale/locale.tex
newlib/libc/machine/Makefile.am
newlib/libc/machine/Makefile.in
newlib/libc/machine/a29k/Makefile.am
newlib/libc/machine/a29k/Makefile.in
newlib/libc/machine/a29k/aclocal.m4
newlib/libc/machine/a29k/configure
newlib/libc/machine/a29k/configure.in
newlib/libc/machine/aclocal.m4
newlib/libc/machine/arm/Makefile.am
newlib/libc/machine/arm/Makefile.in
newlib/libc/machine/arm/aclocal.m4
newlib/libc/machine/arm/configure
newlib/libc/machine/arm/configure.in
newlib/libc/machine/configure
newlib/libc/machine/configure.in
newlib/libc/machine/d10v/Makefile.am
newlib/libc/machine/d10v/Makefile.in
newlib/libc/machine/d10v/aclocal.m4
newlib/libc/machine/d10v/configure
newlib/libc/machine/d10v/configure.in
newlib/libc/machine/d10v/setjmp.S
newlib/libc/machine/d30v/Makefile.am
newlib/libc/machine/d30v/Makefile.in
newlib/libc/machine/d30v/aclocal.m4
newlib/libc/machine/d30v/configure
newlib/libc/machine/d30v/configure.in
newlib/libc/machine/d30v/setjmp.S
newlib/libc/machine/fr30/Makefile.am
newlib/libc/machine/fr30/Makefile.in
newlib/libc/machine/fr30/aclocal.m4
newlib/libc/machine/fr30/configure
newlib/libc/machine/fr30/configure.in
newlib/libc/machine/fr30/setjmp.S
newlib/libc/machine/h8300/Makefile.am
newlib/libc/machine/h8300/Makefile.in
newlib/libc/machine/h8300/aclocal.m4
newlib/libc/machine/h8300/configure
newlib/libc/machine/h8300/configure.in
newlib/libc/machine/h8300/defines.h
newlib/libc/machine/h8300/memcpy.S
newlib/libc/machine/h8300/memset.S
newlib/libc/machine/h8300/reg_memcpy.S
newlib/libc/machine/h8300/reg_memset.S
newlib/libc/machine/h8300/setjmp.S
newlib/libc/machine/h8300/strcmp.S
newlib/libc/machine/h8500/Makefile.am
newlib/libc/machine/h8500/Makefile.in
newlib/libc/machine/h8500/aclocal.m4
newlib/libc/machine/h8500/cmpsi.c
newlib/libc/machine/h8500/configure
newlib/libc/machine/h8500/configure.in
newlib/libc/machine/h8500/divhi3.S
newlib/libc/machine/h8500/divsi3.c
newlib/libc/machine/h8500/mulhi3.c
newlib/libc/machine/h8500/mulsi3.c
newlib/libc/machine/h8500/negsi2.c
newlib/libc/machine/h8500/psi.S
newlib/libc/machine/h8500/setjmp.S
newlib/libc/machine/h8500/shifts.c
newlib/libc/machine/hppa/DEFS.h
newlib/libc/machine/hppa/Makefile.am
newlib/libc/machine/hppa/Makefile.in
newlib/libc/machine/hppa/aclocal.m4
newlib/libc/machine/hppa/configure
newlib/libc/machine/hppa/configure.in
newlib/libc/machine/hppa/memchr.S
newlib/libc/machine/hppa/memcmp.S
newlib/libc/machine/hppa/memcpy.S
newlib/libc/machine/hppa/memset.S
newlib/libc/machine/hppa/pcc_prefix.s
newlib/libc/machine/hppa/setjmp.S
newlib/libc/machine/hppa/strcat.S
newlib/libc/machine/hppa/strcmp.S
newlib/libc/machine/hppa/strcpy.S
newlib/libc/machine/hppa/strlen.S
newlib/libc/machine/hppa/strncat.S
newlib/libc/machine/hppa/strncmp.S
newlib/libc/machine/hppa/strncpy.S
newlib/libc/machine/i386/Makefile.am
newlib/libc/machine/i386/Makefile.in
newlib/libc/machine/i386/aclocal.m4
newlib/libc/machine/i386/configure
newlib/libc/machine/i386/configure.in
newlib/libc/machine/i386/f_atan2.S
newlib/libc/machine/i386/f_atan2f.S
newlib/libc/machine/i386/f_exp.c
newlib/libc/machine/i386/f_expf.c
newlib/libc/machine/i386/f_frexp.S
newlib/libc/machine/i386/f_frexpf.S
newlib/libc/machine/i386/f_ldexp.S
newlib/libc/machine/i386/f_ldexpf.S
newlib/libc/machine/i386/f_log.S
newlib/libc/machine/i386/f_log10.S
newlib/libc/machine/i386/f_log10f.S
newlib/libc/machine/i386/f_logf.S
newlib/libc/machine/i386/f_math.h
newlib/libc/machine/i386/f_pow.c
newlib/libc/machine/i386/f_powf.c
newlib/libc/machine/i386/f_tan.S
newlib/libc/machine/i386/f_tanf.S
newlib/libc/machine/i386/i386mach.h
newlib/libc/machine/i386/memchr.S
newlib/libc/machine/i386/memcmp.S
newlib/libc/machine/i386/memcpy.S
newlib/libc/machine/i386/memmove.S
newlib/libc/machine/i386/memset.S
newlib/libc/machine/i386/setjmp.S
newlib/libc/machine/i386/strchr.S
newlib/libc/machine/i386/strlen.S
newlib/libc/machine/i960/Makefile.am
newlib/libc/machine/i960/Makefile.in
newlib/libc/machine/i960/aclocal.m4
newlib/libc/machine/i960/configure
newlib/libc/machine/i960/configure.in
newlib/libc/machine/i960/memccpy.S
newlib/libc/machine/i960/memccpy_ca.S
newlib/libc/machine/i960/memchr.S
newlib/libc/machine/i960/memchr_ca.S
newlib/libc/machine/i960/memcmp.S
newlib/libc/machine/i960/memcmp_ca.S
newlib/libc/machine/i960/memcpy.S
newlib/libc/machine/i960/memcpy_ca.S
newlib/libc/machine/i960/memset.S
newlib/libc/machine/i960/setjmp.S
newlib/libc/machine/i960/strchr.S
newlib/libc/machine/i960/strchr_ca.S
newlib/libc/machine/i960/strcmp.S
newlib/libc/machine/i960/strcmp_ca.S
newlib/libc/machine/i960/strcpy.S
newlib/libc/machine/i960/strcpy_ca.S
newlib/libc/machine/i960/strcspn.S
newlib/libc/machine/i960/strdup.S
newlib/libc/machine/i960/strlen.S
newlib/libc/machine/i960/strlen_ca.S
newlib/libc/machine/i960/strncat.S
newlib/libc/machine/i960/strncat_ca.S
newlib/libc/machine/i960/strncmp.S
newlib/libc/machine/i960/strncmp_ca.S
newlib/libc/machine/i960/strncpy.S
newlib/libc/machine/i960/strncpy_ca.S
newlib/libc/machine/i960/strpbrk.S
newlib/libc/machine/i960/strrchr.S
newlib/libc/machine/m32r/Makefile.am
newlib/libc/machine/m32r/Makefile.in
newlib/libc/machine/m32r/aclocal.m4
newlib/libc/machine/m32r/configure
newlib/libc/machine/m32r/configure.in
newlib/libc/machine/m32r/setjmp.S
newlib/libc/machine/m68k/Makefile.am
newlib/libc/machine/m68k/Makefile.in
newlib/libc/machine/m68k/aclocal.m4
newlib/libc/machine/m68k/configure
newlib/libc/machine/m68k/configure.in
newlib/libc/machine/m68k/setjmp.S
newlib/libc/machine/m68k/strcpy.c
newlib/libc/machine/m68k/strlen.c
newlib/libc/machine/m88k/Makefile.am
newlib/libc/machine/m88k/Makefile.in
newlib/libc/machine/m88k/aclocal.m4
newlib/libc/machine/m88k/configure
newlib/libc/machine/m88k/configure.in
newlib/libc/machine/m88k/setjmp.S
newlib/libc/machine/mips/Makefile.am
newlib/libc/machine/mips/Makefile.in
newlib/libc/machine/mips/aclocal.m4
newlib/libc/machine/mips/configure
newlib/libc/machine/mips/configure.in
newlib/libc/machine/mips/machine/regdef.h
newlib/libc/machine/mips/setjmp.S
newlib/libc/machine/mn10200/Makefile.am
newlib/libc/machine/mn10200/Makefile.in
newlib/libc/machine/mn10200/aclocal.m4
newlib/libc/machine/mn10200/configure
newlib/libc/machine/mn10200/configure.in
newlib/libc/machine/mn10200/setjmp.S
newlib/libc/machine/mn10300/Makefile.am
newlib/libc/machine/mn10300/Makefile.in
newlib/libc/machine/mn10300/aclocal.m4
newlib/libc/machine/mn10300/configure
newlib/libc/machine/mn10300/configure.in
newlib/libc/machine/mn10300/memchr.S
newlib/libc/machine/mn10300/memcmp.S
newlib/libc/machine/mn10300/memcpy.S
newlib/libc/machine/mn10300/memset.S
newlib/libc/machine/mn10300/setjmp.S
newlib/libc/machine/mn10300/strchr.S
newlib/libc/machine/mn10300/strcmp.S
newlib/libc/machine/mn10300/strcpy.S
newlib/libc/machine/mn10300/strlen.S
newlib/libc/machine/necv70/Makefile.am
newlib/libc/machine/necv70/Makefile.in
newlib/libc/machine/necv70/aclocal.m4
newlib/libc/machine/necv70/configure
newlib/libc/machine/necv70/configure.in
newlib/libc/machine/necv70/fastmath.s
newlib/libc/machine/necv70/machine/registers.h
newlib/libc/machine/necv70/necv70.tex
newlib/libc/machine/necv70/setjmp.s
newlib/libc/machine/powerpc/Makefile.am
newlib/libc/machine/powerpc/Makefile.in
newlib/libc/machine/powerpc/aclocal.m4
newlib/libc/machine/powerpc/configure
newlib/libc/machine/powerpc/configure.in
newlib/libc/machine/powerpc/setjmp.S
newlib/libc/machine/sh/Makefile.am
newlib/libc/machine/sh/Makefile.in
newlib/libc/machine/sh/aclocal.m4
newlib/libc/machine/sh/asm.h
newlib/libc/machine/sh/configure
newlib/libc/machine/sh/configure.in
newlib/libc/machine/sh/memcpy.S
newlib/libc/machine/sh/memset.S
newlib/libc/machine/sh/setjmp.S
newlib/libc/machine/sh/strcmp.S
newlib/libc/machine/sh/strcpy.S
newlib/libc/machine/sparc/Makefile.am
newlib/libc/machine/sparc/Makefile.in
newlib/libc/machine/sparc/aclocal.m4
newlib/libc/machine/sparc/configure
newlib/libc/machine/sparc/configure.in
newlib/libc/machine/sparc/machine/sparclet.h
newlib/libc/machine/sparc/scan.c
newlib/libc/machine/sparc/setjmp.S
newlib/libc/machine/sparc/shuffle.c
newlib/libc/machine/tic80/Makefile.am
newlib/libc/machine/tic80/Makefile.in
newlib/libc/machine/tic80/aclocal.m4
newlib/libc/machine/tic80/configure
newlib/libc/machine/tic80/configure.in
newlib/libc/machine/tic80/setjmp.S
newlib/libc/machine/v850/Makefile.am
newlib/libc/machine/v850/Makefile.in
newlib/libc/machine/v850/aclocal.m4
newlib/libc/machine/v850/configure
newlib/libc/machine/v850/configure.in
newlib/libc/machine/v850/setjmp.S
newlib/libc/machine/w65/Makefile.am
newlib/libc/machine/w65/Makefile.in
newlib/libc/machine/w65/aclocal.m4
newlib/libc/machine/w65/cmpsi.c
newlib/libc/machine/w65/configure
newlib/libc/machine/w65/configure.in
newlib/libc/machine/w65/divsi3.c
newlib/libc/machine/w65/lshrhi.s
newlib/libc/machine/w65/mulsi3.c
newlib/libc/machine/w65/sdivhi3.s
newlib/libc/machine/w65/smulhi3.s
newlib/libc/machine/w65/udivhi3.s
newlib/libc/machine/w65/umodhi3.s
newlib/libc/machine/xscale/Makefile.am
newlib/libc/machine/xscale/Makefile.in
newlib/libc/machine/xscale/aclocal.m4
newlib/libc/machine/xscale/configure
newlib/libc/machine/xscale/configure.in
newlib/libc/machine/xscale/memchr.c
newlib/libc/machine/xscale/memcmp.c
newlib/libc/machine/xscale/memcpy.c
newlib/libc/machine/xscale/memmove.c
newlib/libc/machine/xscale/memset.c
newlib/libc/machine/xscale/strchr.c
newlib/libc/machine/xscale/strcmp.c
newlib/libc/machine/xscale/strcpy.c
newlib/libc/machine/xscale/strlen.c
newlib/libc/machine/xscale/xscale.h
newlib/libc/machine/xstormy16/Makefile.am
newlib/libc/machine/xstormy16/Makefile.in
newlib/libc/machine/xstormy16/aclocal.m4
newlib/libc/machine/xstormy16/configure
newlib/libc/machine/xstormy16/configure.in
newlib/libc/machine/xstormy16/mallocr.c
newlib/libc/machine/xstormy16/setjmp.S
newlib/libc/machine/xstormy16/tiny-malloc.c
newlib/libc/machine/z8k/Makefile.am
newlib/libc/machine/z8k/Makefile.in
newlib/libc/machine/z8k/aclocal.m4
newlib/libc/machine/z8k/args.h
newlib/libc/machine/z8k/configure
newlib/libc/machine/z8k/configure.in
newlib/libc/machine/z8k/setjmp.S
newlib/libc/misc/Makefile.am
newlib/libc/misc/Makefile.in
newlib/libc/misc/dprintf.c
newlib/libc/misc/ffs.c
newlib/libc/misc/misc.tex
newlib/libc/misc/unctrl.c
newlib/libc/posix/Makefile.am
newlib/libc/posix/Makefile.in
newlib/libc/posix/closedir.c
newlib/libc/posix/creat.c
newlib/libc/posix/execl.c
newlib/libc/posix/execle.c
newlib/libc/posix/execlp.c
newlib/libc/posix/execv.c
newlib/libc/posix/execve.c
newlib/libc/posix/execvp.c
newlib/libc/posix/isatty.c
newlib/libc/posix/opendir.c
newlib/libc/posix/popen.c
newlib/libc/posix/readdir.c
newlib/libc/posix/rewinddir.c
newlib/libc/posix/scandir.c
newlib/libc/posix/seekdir.c
newlib/libc/posix/telldir.c
newlib/libc/reent/Makefile.am
newlib/libc/reent/Makefile.in
newlib/libc/reent/closer.c
newlib/libc/reent/execr.c
newlib/libc/reent/fstatr.c
newlib/libc/reent/impure.c
newlib/libc/reent/linkr.c
newlib/libc/reent/lseekr.c
newlib/libc/reent/openr.c
newlib/libc/reent/readr.c
newlib/libc/reent/reent.c
newlib/libc/reent/reent.tex
newlib/libc/reent/sbrkr.c
newlib/libc/reent/signalr.c
newlib/libc/reent/signgam.c
newlib/libc/reent/statr.c
newlib/libc/reent/timer.c
newlib/libc/reent/unlinkr.c
newlib/libc/reent/writer.c
newlib/libc/saber
newlib/libc/signal/Makefile.am
newlib/libc/signal/Makefile.in
newlib/libc/signal/raise.c
newlib/libc/signal/signal.c
newlib/libc/signal/signal.tex
newlib/libc/stdio/Makefile.am
newlib/libc/stdio/Makefile.in
newlib/libc/stdio/clearerr.c
newlib/libc/stdio/fclose.c
newlib/libc/stdio/fdopen.c
newlib/libc/stdio/feof.c
newlib/libc/stdio/ferror.c
newlib/libc/stdio/fflush.c
newlib/libc/stdio/fgetc.c
newlib/libc/stdio/fgetpos.c
newlib/libc/stdio/fgets.c
newlib/libc/stdio/fileno.c
newlib/libc/stdio/findfp.c
newlib/libc/stdio/fiprintf.c
newlib/libc/stdio/flags.c
newlib/libc/stdio/floatio.h
newlib/libc/stdio/fopen.c
newlib/libc/stdio/fprintf.c
newlib/libc/stdio/fputc.c
newlib/libc/stdio/fputs.c
newlib/libc/stdio/fread.c
newlib/libc/stdio/freopen.c
newlib/libc/stdio/fscanf.c
newlib/libc/stdio/fseek.c
newlib/libc/stdio/fsetpos.c
newlib/libc/stdio/ftell.c
newlib/libc/stdio/fvwrite.c
newlib/libc/stdio/fvwrite.h
newlib/libc/stdio/fwalk.c
newlib/libc/stdio/fwrite.c
newlib/libc/stdio/getc.c
newlib/libc/stdio/getchar.c
newlib/libc/stdio/gets.c
newlib/libc/stdio/getw.c
newlib/libc/stdio/iprintf.c
newlib/libc/stdio/local.h
newlib/libc/stdio/makebuf.c
newlib/libc/stdio/mktemp.c
newlib/libc/stdio/perror.c
newlib/libc/stdio/printf.c
newlib/libc/stdio/putc.c
newlib/libc/stdio/putchar.c
newlib/libc/stdio/puts.c
newlib/libc/stdio/putw.c
newlib/libc/stdio/refill.c
newlib/libc/stdio/remove.c
newlib/libc/stdio/rename.c
newlib/libc/stdio/rewind.c
newlib/libc/stdio/rget.c
newlib/libc/stdio/scanf.c
newlib/libc/stdio/setbuf.c
newlib/libc/stdio/setvbuf.c
newlib/libc/stdio/siprintf.c
newlib/libc/stdio/snprintf.c
newlib/libc/stdio/sprintf.c
newlib/libc/stdio/sscanf.c
newlib/libc/stdio/stdio.c
newlib/libc/stdio/stdio.tex
newlib/libc/stdio/tmpfile.c
newlib/libc/stdio/tmpnam.c
newlib/libc/stdio/ungetc.c
newlib/libc/stdio/vfieeefp.h
newlib/libc/stdio/vfprintf.c
newlib/libc/stdio/vfscanf.c
newlib/libc/stdio/vprintf.c
newlib/libc/stdio/vscanf.c
newlib/libc/stdio/vsnprintf.c
newlib/libc/stdio/vsprintf.c
newlib/libc/stdio/vsscanf.c
newlib/libc/stdio/wbuf.c
newlib/libc/stdio/wsetup.c
newlib/libc/stdlib/Makefile.am
newlib/libc/stdlib/Makefile.in
newlib/libc/stdlib/__adjust.c
newlib/libc/stdlib/__exp10.c
newlib/libc/stdlib/__ten_mu.c
newlib/libc/stdlib/abort.c
newlib/libc/stdlib/abs.c
newlib/libc/stdlib/assert.c
newlib/libc/stdlib/atexit.c
newlib/libc/stdlib/atexit.h
newlib/libc/stdlib/atof.c
newlib/libc/stdlib/atoff.c
newlib/libc/stdlib/atoi.c
newlib/libc/stdlib/atol.c
newlib/libc/stdlib/bsearch.c
newlib/libc/stdlib/calloc.c
newlib/libc/stdlib/div.c
newlib/libc/stdlib/drand48.c
newlib/libc/stdlib/dtoa.c
newlib/libc/stdlib/dtoastub.c
newlib/libc/stdlib/ecvtbuf.c
newlib/libc/stdlib/efgcvt.c
newlib/libc/stdlib/environ.c
newlib/libc/stdlib/envlock.c
newlib/libc/stdlib/envlock.h
newlib/libc/stdlib/eprintf.c
newlib/libc/stdlib/erand48.c
newlib/libc/stdlib/exit.c
newlib/libc/stdlib/getenv.c
newlib/libc/stdlib/getenv_r.c
newlib/libc/stdlib/getopt.c
newlib/libc/stdlib/jrand48.c
newlib/libc/stdlib/labs.c
newlib/libc/stdlib/lcong48.c
newlib/libc/stdlib/ldiv.c
newlib/libc/stdlib/ldtoa.c
newlib/libc/stdlib/local.h
newlib/libc/stdlib/lrand48.c
newlib/libc/stdlib/malign.c
newlib/libc/stdlib/malloc.c
newlib/libc/stdlib/mallocr.c
newlib/libc/stdlib/mbctype.h
newlib/libc/stdlib/mblen.c
newlib/libc/stdlib/mblen_r.c
newlib/libc/stdlib/mbstowcs.c
newlib/libc/stdlib/mbstowcs_r.c
newlib/libc/stdlib/mbtowc.c
newlib/libc/stdlib/mbtowc_r.c
newlib/libc/stdlib/mlock.c
newlib/libc/stdlib/mprec.c
newlib/libc/stdlib/mprec.h
newlib/libc/stdlib/mrand48.c
newlib/libc/stdlib/msize.c
newlib/libc/stdlib/mstats.c
newlib/libc/stdlib/mtrim.c
newlib/libc/stdlib/nrand48.c
newlib/libc/stdlib/putenv.c
newlib/libc/stdlib/putenv_r.c
newlib/libc/stdlib/qsort.c
newlib/libc/stdlib/rand.c
newlib/libc/stdlib/rand48.c
newlib/libc/stdlib/rand48.h
newlib/libc/stdlib/rand_r.c
newlib/libc/stdlib/realloc.c
newlib/libc/stdlib/seed48.c
newlib/libc/stdlib/setenv.c
newlib/libc/stdlib/setenv_r.c
newlib/libc/stdlib/srand48.c
newlib/libc/stdlib/std.h
newlib/libc/stdlib/stdlib.tex
newlib/libc/stdlib/strdup.c
newlib/libc/stdlib/strdup_r.c
newlib/libc/stdlib/strtod.c
newlib/libc/stdlib/strtol.c
newlib/libc/stdlib/strtoll.c
newlib/libc/stdlib/strtoll_r.c
newlib/libc/stdlib/strtoul.c
newlib/libc/stdlib/strtoull.c
newlib/libc/stdlib/strtoull_r.c
newlib/libc/stdlib/system.c
newlib/libc/stdlib/valloc.c
newlib/libc/stdlib/wcstombs.c
newlib/libc/stdlib/wcstombs_r.c
newlib/libc/stdlib/wctomb.c
newlib/libc/stdlib/wctomb_r.c
newlib/libc/string/Makefile.am
newlib/libc/string/Makefile.in
newlib/libc/string/bcmp.c
newlib/libc/string/bcopy.c
newlib/libc/string/bzero.c
newlib/libc/string/index.c
newlib/libc/string/memchr.c
newlib/libc/string/memcmp.c
newlib/libc/string/memcpy.c
newlib/libc/string/memmove.c
newlib/libc/string/memset.c
newlib/libc/string/rindex.c
newlib/libc/string/strcasecmp.c
newlib/libc/string/strcat.c
newlib/libc/string/strchr.c
newlib/libc/string/strcmp.c
newlib/libc/string/strcoll.c
newlib/libc/string/strcpy.c
newlib/libc/string/strcspn.c
newlib/libc/string/strerror.c
newlib/libc/string/strings.tex
newlib/libc/string/strlen.c
newlib/libc/string/strlwr.c
newlib/libc/string/strncasecmp.c
newlib/libc/string/strncat.c
newlib/libc/string/strncmp.c
newlib/libc/string/strncpy.c
newlib/libc/string/strpbrk.c
newlib/libc/string/strrchr.c
newlib/libc/string/strspn.c
newlib/libc/string/strstr.c
newlib/libc/string/strtok.c
newlib/libc/string/strtok_r.c
newlib/libc/string/strupr.c
newlib/libc/string/strxfrm.c
newlib/libc/string/swab.c
newlib/libc/string/u_strerr.c
newlib/libc/sys.tex
newlib/libc/sys/Makefile.am
newlib/libc/sys/Makefile.in
newlib/libc/sys/a29khif/Makefile.am
newlib/libc/sys/a29khif/Makefile.in
newlib/libc/sys/a29khif/_alloc.s
newlib/libc/sys/a29khif/_close.s
newlib/libc/sys/a29khif/_cycles.s
newlib/libc/sys/a29khif/_exit.s
newlib/libc/sys/a29khif/_fstat.s
newlib/libc/sys/a29khif/_getpsiz.s
newlib/libc/sys/a29khif/_gettz.s
newlib/libc/sys/a29khif/_ioctl.s
newlib/libc/sys/a29khif/_iostat.s
newlib/libc/sys/a29khif/_iowait.s
newlib/libc/sys/a29khif/_isatty.s
newlib/libc/sys/a29khif/_lseek.s
newlib/libc/sys/a29khif/_open.s
newlib/libc/sys/a29khif/_query.s
newlib/libc/sys/a29khif/_read.s
newlib/libc/sys/a29khif/_sbrk.s
newlib/libc/sys/a29khif/_setim.s
newlib/libc/sys/a29khif/_settrap.s
newlib/libc/sys/a29khif/_setvec.s
newlib/libc/sys/a29khif/_tmpnam.s
newlib/libc/sys/a29khif/_write.s
newlib/libc/sys/a29khif/aclocal.m4
newlib/libc/sys/a29khif/alloc.s
newlib/libc/sys/a29khif/clock.s
newlib/libc/sys/a29khif/configure
newlib/libc/sys/a29khif/configure.in
newlib/libc/sys/a29khif/crt0.s
newlib/libc/sys/a29khif/getargs.s
newlib/libc/sys/a29khif/getenv.s
newlib/libc/sys/a29khif/getpid.c
newlib/libc/sys/a29khif/kill.c
newlib/libc/sys/a29khif/read.s
newlib/libc/sys/a29khif/remove.s
newlib/libc/sys/a29khif/rename.s
newlib/libc/sys/a29khif/signal.s
newlib/libc/sys/a29khif/stubs.s
newlib/libc/sys/a29khif/sys/cpudef.h
newlib/libc/sys/a29khif/sys/fpsymbol.h
newlib/libc/sys/a29khif/sys/intrinsi.h
newlib/libc/sys/a29khif/sys/macros.h
newlib/libc/sys/a29khif/sys/proreg.h
newlib/libc/sys/a29khif/sys/romdcl.h
newlib/libc/sys/a29khif/sys/smartmac.h
newlib/libc/sys/a29khif/sys/sysmac.h
newlib/libc/sys/a29khif/systime.s
newlib/libc/sys/a29khif/vec.s
newlib/libc/sys/aclocal.m4
newlib/libc/sys/arc/Makefile.am
newlib/libc/sys/arc/Makefile.in
newlib/libc/sys/arc/aclocal.m4
newlib/libc/sys/arc/configure
newlib/libc/sys/arc/configure.in
newlib/libc/sys/arc/crt0.S
newlib/libc/sys/arc/isatty.c
newlib/libc/sys/arc/mem-layout.c
newlib/libc/sys/arc/sbrk.c
newlib/libc/sys/arc/sys/syscall.h
newlib/libc/sys/arc/syscalls.c
newlib/libc/sys/arm/Makefile.am
newlib/libc/sys/arm/Makefile.in
newlib/libc/sys/arm/aclocal.m4
newlib/libc/sys/arm/configure
newlib/libc/sys/arm/configure.in
newlib/libc/sys/arm/crt0.S
newlib/libc/sys/arm/libcfunc.c
newlib/libc/sys/arm/setjmp.S
newlib/libc/sys/arm/swi.h
newlib/libc/sys/arm/sys/param.h
newlib/libc/sys/arm/syscalls.c
newlib/libc/sys/arm/trap.S
newlib/libc/sys/configure
newlib/libc/sys/configure.in
newlib/libc/sys/cygwin/Makefile.am
newlib/libc/sys/cygwin/Makefile.in
newlib/libc/sys/cygwin/aclocal.m4
newlib/libc/sys/cygwin/configure
newlib/libc/sys/cygwin/configure.in
newlib/libc/sys/cygwin/crt0.c
newlib/libc/sys/cygwin/include/unistd.h
newlib/libc/sys/cygwin/sys/dirent.h
newlib/libc/sys/cygwin/sys/param.h
newlib/libc/sys/cygwin/sys/utime.h
newlib/libc/sys/cygwin/sys/utmp.h
newlib/libc/sys/d10v/Makefile.am
newlib/libc/sys/d10v/Makefile.in
newlib/libc/sys/d10v/aclocal.m4
newlib/libc/sys/d10v/configure
newlib/libc/sys/d10v/configure.in
newlib/libc/sys/d10v/creat.c
newlib/libc/sys/d10v/crt0.S
newlib/libc/sys/d10v/sys/syscall.h
newlib/libc/sys/d10v/syscalls.c
newlib/libc/sys/d10v/trap.S
newlib/libc/sys/decstation/Makefile.am
newlib/libc/sys/decstation/Makefile.in
newlib/libc/sys/decstation/_main.c
newlib/libc/sys/decstation/aclocal.m4
newlib/libc/sys/decstation/configure
newlib/libc/sys/decstation/configure.in
newlib/libc/sys/decstation/sys/dirent.h
newlib/libc/sys/go32/Makefile.am
newlib/libc/sys/go32/Makefile.in
newlib/libc/sys/go32/_exit.s
newlib/libc/sys/go32/_main.c
newlib/libc/sys/go32/abort.c
newlib/libc/sys/go32/access.c
newlib/libc/sys/go32/aclocal.m4
newlib/libc/sys/go32/bdos.c
newlib/libc/sys/go32/bdosptr.c
newlib/libc/sys/go32/brk.s
newlib/libc/sys/go32/chdir.s
newlib/libc/sys/go32/chmod.c
newlib/libc/sys/go32/chown.c
newlib/libc/sys/go32/clock.S
newlib/libc/sys/go32/close.s
newlib/libc/sys/go32/configure
newlib/libc/sys/go32/configure.in
newlib/libc/sys/go32/copying.dj
newlib/libc/sys/go32/creat.s
newlib/libc/sys/go32/crlf2nl.c
newlib/libc/sys/go32/crt0.S
newlib/libc/sys/go32/dir.c
newlib/libc/sys/go32/dir.h
newlib/libc/sys/go32/djtime.h
newlib/libc/sys/go32/dos.h
newlib/libc/sys/go32/dosmem.S
newlib/libc/sys/go32/dpmi.c
newlib/libc/sys/go32/dpmi.h
newlib/libc/sys/go32/dup.s
newlib/libc/sys/go32/dup2.s
newlib/libc/sys/go32/exec.c
newlib/libc/sys/go32/fchmod.c
newlib/libc/sys/go32/findfirs.s
newlib/libc/sys/go32/findnext.s
newlib/libc/sys/go32/fixpath.c
newlib/libc/sys/go32/fstat.s
newlib/libc/sys/go32/fsync.s
newlib/libc/sys/go32/ftruncat.c
newlib/libc/sys/go32/gerrno.s
newlib/libc/sys/go32/getcwd.c
newlib/libc/sys/go32/getdate.c
newlib/libc/sys/go32/getdtabl.c
newlib/libc/sys/go32/getgid.c
newlib/libc/sys/go32/getkey.s
newlib/libc/sys/go32/getpages.c
newlib/libc/sys/go32/getpid.c
newlib/libc/sys/go32/getrusag.c
newlib/libc/sys/go32/gettime.c
newlib/libc/sys/go32/gettimeo.c
newlib/libc/sys/go32/gettimeo.s
newlib/libc/sys/go32/getuid.c
newlib/libc/sys/go32/getwd.s
newlib/libc/sys/go32/go32.h
newlib/libc/sys/go32/go32func.c
newlib/libc/sys/go32/infoblk.c
newlib/libc/sys/go32/inportb.s
newlib/libc/sys/go32/inportl.s
newlib/libc/sys/go32/inportsb.s
newlib/libc/sys/go32/inportsl.s
newlib/libc/sys/go32/inportsw.s
newlib/libc/sys/go32/inportw.s
newlib/libc/sys/go32/int86x.s
newlib/libc/sys/go32/intdos.c
newlib/libc/sys/go32/intdosx.c
newlib/libc/sys/go32/isatty.s
newlib/libc/sys/go32/kbhit.s
newlib/libc/sys/go32/kill.c
newlib/libc/sys/go32/link.s
newlib/libc/sys/go32/longjmp.S
newlib/libc/sys/go32/lseek.s
newlib/libc/sys/go32/lstat.s
newlib/libc/sys/go32/mkdir.s
newlib/libc/sys/go32/open.s
newlib/libc/sys/go32/outportb.s
newlib/libc/sys/go32/outportl.s
newlib/libc/sys/go32/outportw.s
newlib/libc/sys/go32/outprtsb.s
newlib/libc/sys/go32/outprtsl.s
newlib/libc/sys/go32/outprtsw.s
newlib/libc/sys/go32/pc.h
newlib/libc/sys/go32/read.s
newlib/libc/sys/go32/readv.c
newlib/libc/sys/go32/rename.s
newlib/libc/sys/go32/rmdir.s
newlib/libc/sys/go32/sbrk.s
newlib/libc/sys/go32/screen.S
newlib/libc/sys/go32/setjmp.S
newlib/libc/sys/go32/setmode.s
newlib/libc/sys/go32/setstack.S
newlib/libc/sys/go32/settimeo.s
newlib/libc/sys/go32/sleep.c
newlib/libc/sys/go32/stat.c
newlib/libc/sys/go32/stat.s
newlib/libc/sys/go32/stat_ast.s
newlib/libc/sys/go32/sys/dir.h
newlib/libc/sys/go32/sys/dirent.h
newlib/libc/sys/go32/sys/dos.h
newlib/libc/sys/go32/sys/dpmi.h
newlib/libc/sys/go32/sys/errno.h
newlib/libc/sys/go32/sys/fcntl.h
newlib/libc/sys/go32/sys/file.h
newlib/libc/sys/go32/sys/go32.h
newlib/libc/sys/go32/sys/param.h
newlib/libc/sys/go32/sys/pc.h
newlib/libc/sys/go32/sys/register.h
newlib/libc/sys/go32/sys/resource.h
newlib/libc/sys/go32/sys/setjmp.h
newlib/libc/sys/go32/sys/stdc.h
newlib/libc/sys/go32/sys/uio.h
newlib/libc/sys/go32/syserr.c
newlib/libc/sys/go32/system.s
newlib/libc/sys/go32/tell.s
newlib/libc/sys/go32/time.c
newlib/libc/sys/go32/truncate.c
newlib/libc/sys/go32/turbo.s
newlib/libc/sys/go32/umask.c
newlib/libc/sys/go32/unlink.s
newlib/libc/sys/go32/utime.c
newlib/libc/sys/go32/utimes.c
newlib/libc/sys/go32/write.s
newlib/libc/sys/go32/writestub.c
newlib/libc/sys/go32/writev.c
newlib/libc/sys/h8300hms/Makefile.am
newlib/libc/sys/h8300hms/Makefile.in
newlib/libc/sys/h8300hms/_exit.c
newlib/libc/sys/h8300hms/aclocal.m4
newlib/libc/sys/h8300hms/configure
newlib/libc/sys/h8300hms/configure.in
newlib/libc/sys/h8300hms/crt0.S
newlib/libc/sys/h8300hms/crt1.c
newlib/libc/sys/h8300hms/misc.c
newlib/libc/sys/h8300hms/sbrk.c
newlib/libc/sys/h8300hms/sys/file.h
newlib/libc/sys/h8300hms/syscalls.c
newlib/libc/sys/h8300hms/write.c
newlib/libc/sys/h8500hms/Makefile.am
newlib/libc/sys/h8500hms/Makefile.in
newlib/libc/sys/h8500hms/aclocal.m4
newlib/libc/sys/h8500hms/configure
newlib/libc/sys/h8500hms/configure.in
newlib/libc/sys/h8500hms/crt0.c
newlib/libc/sys/h8500hms/misc.c
newlib/libc/sys/h8500hms/syscalls.c
newlib/libc/sys/linux/Makefile.am
newlib/libc/sys/linux/Makefile.in
newlib/libc/sys/linux/aclocal.m4
newlib/libc/sys/linux/brk.c
newlib/libc/sys/linux/configure
newlib/libc/sys/linux/configure.in
newlib/libc/sys/linux/crt0.c
newlib/libc/sys/linux/getoptlong.c
newlib/libc/sys/linux/ids.c
newlib/libc/sys/linux/include/getopt.h
newlib/libc/sys/linux/include/stdint.h
newlib/libc/sys/linux/include/unistd.h
newlib/libc/sys/linux/inode.c
newlib/libc/sys/linux/io.c
newlib/libc/sys/linux/linux.c
newlib/libc/sys/linux/process.c
newlib/libc/sys/linux/realpath.c
newlib/libc/sys/linux/select.c
newlib/libc/sys/linux/shared.ld
newlib/libc/sys/linux/signal.c
newlib/libc/sys/linux/sys/cdefs.h
newlib/libc/sys/linux/sys/dirent.h
newlib/libc/sys/linux/sys/errno.h
newlib/libc/sys/linux/sys/fcntl.h
newlib/libc/sys/linux/sys/file.h
newlib/libc/sys/linux/sys/ioctl.h
newlib/libc/sys/linux/sys/resource.h
newlib/libc/sys/linux/sys/signal.h
newlib/libc/sys/linux/sys/stat.h
newlib/libc/sys/linux/sys/syscall.h
newlib/libc/sys/linux/sys/termios.h
newlib/libc/sys/linux/sys/time.h
newlib/libc/sys/linux/sys/types.h
newlib/libc/sys/linux/sys/utmp.h
newlib/libc/sys/linux/sys/utsname.h
newlib/libc/sys/linux/sys/wait.h
newlib/libc/sys/linux/systat.c
newlib/libc/sys/linux/termios.c
newlib/libc/sys/linux/time.c
newlib/libc/sys/linux/wait.c
newlib/libc/sys/m88kbug/Makefile.am
newlib/libc/sys/m88kbug/Makefile.in
newlib/libc/sys/m88kbug/aclocal.m4
newlib/libc/sys/m88kbug/configure
newlib/libc/sys/m88kbug/configure.in
newlib/libc/sys/m88kbug/crt0.c
newlib/libc/sys/m88kbug/sys/systraps.h
newlib/libc/sys/m88kbug/syscalls.c
newlib/libc/sys/mmixware/Makefile.am
newlib/libc/sys/mmixware/Makefile.in
newlib/libc/sys/mmixware/_exit.c
newlib/libc/sys/mmixware/access.c
newlib/libc/sys/mmixware/aclocal.m4
newlib/libc/sys/mmixware/chmod.c
newlib/libc/sys/mmixware/chown.c
newlib/libc/sys/mmixware/close.c
newlib/libc/sys/mmixware/configure
newlib/libc/sys/mmixware/configure.in
newlib/libc/sys/mmixware/creat.c
newlib/libc/sys/mmixware/crt0.c
newlib/libc/sys/mmixware/execv.c
newlib/libc/sys/mmixware/execve.c
newlib/libc/sys/mmixware/fork.c
newlib/libc/sys/mmixware/fstat.c
newlib/libc/sys/mmixware/getpid.c
newlib/libc/sys/mmixware/gettime.c
newlib/libc/sys/mmixware/isatty.c
newlib/libc/sys/mmixware/kill.c
newlib/libc/sys/mmixware/link.c
newlib/libc/sys/mmixware/lseek.c
newlib/libc/sys/mmixware/open.c
newlib/libc/sys/mmixware/pipe.c
newlib/libc/sys/mmixware/read.c
newlib/libc/sys/mmixware/sbrk.c
newlib/libc/sys/mmixware/setjmp.S
newlib/libc/sys/mmixware/stat.c
newlib/libc/sys/mmixware/sys/syscall.h
newlib/libc/sys/mmixware/time.c
newlib/libc/sys/mmixware/times.c
newlib/libc/sys/mmixware/unlink.c
newlib/libc/sys/mmixware/utime.c
newlib/libc/sys/mmixware/wait.c
newlib/libc/sys/mmixware/write.c
newlib/libc/sys/netware/Makefile.am
newlib/libc/sys/netware/Makefile.in
newlib/libc/sys/netware/aclocal.m4
newlib/libc/sys/netware/configure
newlib/libc/sys/netware/configure.in
newlib/libc/sys/netware/crt0.c
newlib/libc/sys/netware/getpid.c
newlib/libc/sys/netware/link.c
newlib/libc/sys/rtems/Makefile.am
newlib/libc/sys/rtems/Makefile.in
newlib/libc/sys/rtems/aclocal.m4
newlib/libc/sys/rtems/configure
newlib/libc/sys/rtems/configure.in
newlib/libc/sys/rtems/crt0.c
newlib/libc/sys/rtems/dummysys.c
newlib/libc/sys/rtems/include/limits.h
newlib/libc/sys/rtems/sys/dirent.h
newlib/libc/sys/sh/Makefile.am
newlib/libc/sys/sh/Makefile.in
newlib/libc/sys/sh/aclocal.m4
newlib/libc/sys/sh/configure
newlib/libc/sys/sh/configure.in
newlib/libc/sys/sh/creat.c
newlib/libc/sys/sh/crt0.S
newlib/libc/sys/sh/sys/syscall.h
newlib/libc/sys/sh/syscalls.c
newlib/libc/sys/sh/trap.S
newlib/libc/sys/sparc64/Makefile.am
newlib/libc/sys/sparc64/Makefile.in
newlib/libc/sys/sparc64/_exit.S
newlib/libc/sys/sparc64/_main.c
newlib/libc/sys/sparc64/aclocal.m4
newlib/libc/sys/sparc64/cerror.S
newlib/libc/sys/sparc64/closedir.c
newlib/libc/sys/sparc64/configure
newlib/libc/sys/sparc64/configure.in
newlib/libc/sys/sparc64/creat.c
newlib/libc/sys/sparc64/crt0.S
newlib/libc/sys/sparc64/dup2.S
newlib/libc/sys/sparc64/execve.S
newlib/libc/sys/sparc64/ieee.c
newlib/libc/sys/sparc64/isatty.c
newlib/libc/sys/sparc64/lstat.S
newlib/libc/sys/sparc64/opendir.c
newlib/libc/sys/sparc64/readdir.c
newlib/libc/sys/sparc64/rewinddir.c
newlib/libc/sys/sparc64/sbrk.S
newlib/libc/sys/sparc64/scandir.c
newlib/libc/sys/sparc64/seekdir.c
newlib/libc/sys/sparc64/sigsetjmp.S
newlib/libc/sys/sparc64/stat.S
newlib/libc/sys/sparc64/sys/dirent.h
newlib/libc/sys/sparc64/sys/fcntl.h
newlib/libc/sys/sparc64/sys/file.h
newlib/libc/sys/sparc64/sys/stat.h
newlib/libc/sys/sparc64/sys/syscall.h
newlib/libc/sys/sparc64/sys/syscallasm.h
newlib/libc/sys/sparc64/sys/termios.h
newlib/libc/sys/sparc64/sys/time.h
newlib/libc/sys/sparc64/sys/utime.h
newlib/libc/sys/sparc64/sys/utmp.h
newlib/libc/sys/sparc64/sys/wait.h
newlib/libc/sys/sparc64/telldir.c
newlib/libc/sys/sparc64/template.S
newlib/libc/sys/sparc64/template_r.S
newlib/libc/sys/sparc64/utime.S
newlib/libc/sys/sparc64/utime2.c
newlib/libc/sys/sparc64/wait.S
newlib/libc/sys/sun4/Makefile.am
newlib/libc/sys/sun4/Makefile.in
newlib/libc/sys/sun4/_main.c
newlib/libc/sys/sun4/aclocal.m4
newlib/libc/sys/sun4/configure
newlib/libc/sys/sun4/configure.in
newlib/libc/sys/sun4/ieee.c
newlib/libc/sys/sun4/sys/dirent.h
newlib/libc/sys/sun4/sys/file.h
newlib/libc/sys/sun4/sys/termios.h
newlib/libc/sys/sun4/sys/utime.h
newlib/libc/sys/sun4/sys/utmp.h
newlib/libc/sys/sun4/sys/wait.h
newlib/libc/sys/sysmec/Makefile.am
newlib/libc/sys/sysmec/Makefile.in
newlib/libc/sys/sysmec/_exit.c
newlib/libc/sys/sysmec/access.c
newlib/libc/sys/sysmec/aclocal.m4
newlib/libc/sys/sysmec/chmod.c
newlib/libc/sys/sysmec/chown.c
newlib/libc/sys/sysmec/close.c
newlib/libc/sys/sysmec/configure
newlib/libc/sys/sysmec/configure.in
newlib/libc/sys/sysmec/creat.c
newlib/libc/sys/sysmec/crt0.S
newlib/libc/sys/sysmec/crt1.c
newlib/libc/sys/sysmec/execv.c
newlib/libc/sys/sysmec/execve.c
newlib/libc/sys/sysmec/fork.c
newlib/libc/sys/sysmec/fstat.c
newlib/libc/sys/sysmec/getpid.c
newlib/libc/sys/sysmec/gettime.c
newlib/libc/sys/sysmec/isatty.c
newlib/libc/sys/sysmec/kill.c
newlib/libc/sys/sysmec/lseek.c
newlib/libc/sys/sysmec/open.c
newlib/libc/sys/sysmec/pipe.c
newlib/libc/sys/sysmec/read.c
newlib/libc/sys/sysmec/sbrk.c
newlib/libc/sys/sysmec/stat.c
newlib/libc/sys/sysmec/sys/syscall.h
newlib/libc/sys/sysmec/time.c
newlib/libc/sys/sysmec/times.c
newlib/libc/sys/sysmec/trap.S
newlib/libc/sys/sysmec/unlink.c
newlib/libc/sys/sysmec/utime.c
newlib/libc/sys/sysmec/wait.c
newlib/libc/sys/sysmec/write.c
newlib/libc/sys/sysnec810/Makefile.am
newlib/libc/sys/sysnec810/Makefile.in
newlib/libc/sys/sysnec810/aclocal.m4
newlib/libc/sys/sysnec810/configure
newlib/libc/sys/sysnec810/configure.in
newlib/libc/sys/sysnec810/crt0.s
newlib/libc/sys/sysnec810/io.s
newlib/libc/sys/sysnec810/misc.c
newlib/libc/sys/sysnec810/sbrk.c
newlib/libc/sys/sysnec810/write.c
newlib/libc/sys/sysnecv850/Makefile.am
newlib/libc/sys/sysnecv850/Makefile.in
newlib/libc/sys/sysnecv850/_exit.c
newlib/libc/sys/sysnecv850/access.c
newlib/libc/sys/sysnecv850/aclocal.m4
newlib/libc/sys/sysnecv850/chmod.c
newlib/libc/sys/sysnecv850/chown.c
newlib/libc/sys/sysnecv850/close.c
newlib/libc/sys/sysnecv850/configure
newlib/libc/sys/sysnecv850/configure.in
newlib/libc/sys/sysnecv850/creat.c
newlib/libc/sys/sysnecv850/crt0.S
newlib/libc/sys/sysnecv850/crt1.c
newlib/libc/sys/sysnecv850/execv.c
newlib/libc/sys/sysnecv850/execve.c
newlib/libc/sys/sysnecv850/fork.c
newlib/libc/sys/sysnecv850/fstat.c
newlib/libc/sys/sysnecv850/getpid.c
newlib/libc/sys/sysnecv850/gettime.c
newlib/libc/sys/sysnecv850/isatty.c
newlib/libc/sys/sysnecv850/kill.c
newlib/libc/sys/sysnecv850/link.c
newlib/libc/sys/sysnecv850/lseek.c
newlib/libc/sys/sysnecv850/open.c
newlib/libc/sys/sysnecv850/pipe.c
newlib/libc/sys/sysnecv850/read.c
newlib/libc/sys/sysnecv850/sbrk.c
newlib/libc/sys/sysnecv850/stat.c
newlib/libc/sys/sysnecv850/sys/syscall.h
newlib/libc/sys/sysnecv850/time.c
newlib/libc/sys/sysnecv850/times.c
newlib/libc/sys/sysnecv850/trap.S
newlib/libc/sys/sysnecv850/unlink.c
newlib/libc/sys/sysnecv850/utime.c
newlib/libc/sys/sysnecv850/wait.c
newlib/libc/sys/sysnecv850/write.c
newlib/libc/sys/sysvi386/Makefile.am
newlib/libc/sys/sysvi386/Makefile.in
newlib/libc/sys/sysvi386/_exit.s
newlib/libc/sys/sysvi386/_longjmp.s
newlib/libc/sys/sysvi386/_setjmp.s
newlib/libc/sys/sysvi386/access.s
newlib/libc/sys/sysvi386/aclocal.m4
newlib/libc/sys/sysvi386/alarm.s
newlib/libc/sys/sysvi386/brk.s
newlib/libc/sys/sysvi386/cerror.s
newlib/libc/sys/sysvi386/chdir.s
newlib/libc/sys/sysvi386/chmod.s
newlib/libc/sys/sysvi386/close.s
newlib/libc/sys/sysvi386/closedir.c
newlib/libc/sys/sysvi386/configure
newlib/libc/sys/sysvi386/configure.in
newlib/libc/sys/sysvi386/crt0.c
newlib/libc/sys/sysvi386/dup.c
newlib/libc/sys/sysvi386/dup2.c
newlib/libc/sys/sysvi386/exec.c
newlib/libc/sys/sysvi386/execve.s
newlib/libc/sys/sysvi386/fcntl.s
newlib/libc/sys/sysvi386/fork.s
newlib/libc/sys/sysvi386/fpathconf.s
newlib/libc/sys/sysvi386/fps.s
newlib/libc/sys/sysvi386/fpx.c
newlib/libc/sys/sysvi386/fstat.s
newlib/libc/sys/sysvi386/getdents.s
newlib/libc/sys/sysvi386/getegid.s
newlib/libc/sys/sysvi386/geteuid.s
newlib/libc/sys/sysvi386/getgid.s
newlib/libc/sys/sysvi386/getgroups.s
newlib/libc/sys/sysvi386/getpid.s
newlib/libc/sys/sysvi386/getuid.s
newlib/libc/sys/sysvi386/ioctl.s
newlib/libc/sys/sysvi386/isatty.c
newlib/libc/sys/sysvi386/kill.s
newlib/libc/sys/sysvi386/link.s
newlib/libc/sys/sysvi386/lseek.s
newlib/libc/sys/sysvi386/mkdir.s
newlib/libc/sys/sysvi386/open.s
newlib/libc/sys/sysvi386/opendir.c
newlib/libc/sys/sysvi386/pathconf.s
newlib/libc/sys/sysvi386/pause.s
newlib/libc/sys/sysvi386/pipe.s
newlib/libc/sys/sysvi386/read.s
newlib/libc/sys/sysvi386/readdir.c
newlib/libc/sys/sysvi386/rename.s
newlib/libc/sys/sysvi386/rewinddir.c
newlib/libc/sys/sysvi386/rmdir.s
newlib/libc/sys/sysvi386/sbrk.c
newlib/libc/sys/sysvi386/scandir.c
newlib/libc/sys/sysvi386/seekdir.c
newlib/libc/sys/sysvi386/setgid.s
newlib/libc/sys/sysvi386/setuid.s
newlib/libc/sys/sysvi386/sigaction.s
newlib/libc/sys/sysvi386/signal.s
newlib/libc/sys/sysvi386/sigprocmask.s
newlib/libc/sys/sysvi386/sleep.c
newlib/libc/sys/sysvi386/speed.c
newlib/libc/sys/sysvi386/stat.s
newlib/libc/sys/sysvi386/sys/dirent.h
newlib/libc/sys/sysvi386/sys/param.h
newlib/libc/sys/sysvi386/sys/setjmp.h
newlib/libc/sys/sysvi386/sys/termio.h
newlib/libc/sys/sysvi386/sys/termios.h
newlib/libc/sys/sysvi386/sys/utime.h
newlib/libc/sys/sysvi386/sys/utmp.h
newlib/libc/sys/sysvi386/sys/wait.h
newlib/libc/sys/sysvi386/sysconf.s
newlib/libc/sys/sysvi386/tcgetattr.c
newlib/libc/sys/sysvi386/tcline.c
newlib/libc/sys/sysvi386/tcsetattr.c
newlib/libc/sys/sysvi386/telldir.c
newlib/libc/sys/sysvi386/time.s
newlib/libc/sys/sysvi386/times.s
newlib/libc/sys/sysvi386/unlink.s
newlib/libc/sys/sysvi386/utime.s
newlib/libc/sys/sysvi386/wait.s
newlib/libc/sys/sysvi386/waitpid.s
newlib/libc/sys/sysvi386/write.s
newlib/libc/sys/sysvnecv70/Makefile.am
newlib/libc/sys/sysvnecv70/Makefile.in
newlib/libc/sys/sysvnecv70/aclocal.m4
newlib/libc/sys/sysvnecv70/cerror.s
newlib/libc/sys/sysvnecv70/close.s
newlib/libc/sys/sysvnecv70/configure
newlib/libc/sys/sysvnecv70/configure.in
newlib/libc/sys/sysvnecv70/crt0.s
newlib/libc/sys/sysvnecv70/exit.s
newlib/libc/sys/sysvnecv70/fps.s
newlib/libc/sys/sysvnecv70/fpx.c
newlib/libc/sys/sysvnecv70/fstat.s
newlib/libc/sys/sysvnecv70/ioctl.s
newlib/libc/sys/sysvnecv70/isatty.s
newlib/libc/sys/sysvnecv70/lseek.s
newlib/libc/sys/sysvnecv70/open.s
newlib/libc/sys/sysvnecv70/read.s
newlib/libc/sys/sysvnecv70/sbrk.s
newlib/libc/sys/sysvnecv70/sysv60.s
newlib/libc/sys/sysvnecv70/sysvnecv70.tex
newlib/libc/sys/sysvnecv70/write.s
newlib/libc/sys/tic80/Makefile.am
newlib/libc/sys/tic80/Makefile.in
newlib/libc/sys/tic80/aclocal.m4
newlib/libc/sys/tic80/configure
newlib/libc/sys/tic80/configure.in
newlib/libc/sys/tic80/crt0.c
newlib/libc/sys/w65/Makefile.am
newlib/libc/sys/w65/Makefile.in
newlib/libc/sys/w65/aclocal.m4
newlib/libc/sys/w65/configure
newlib/libc/sys/w65/configure.in
newlib/libc/sys/w65/crt0.c
newlib/libc/sys/w65/sys/syscall.h
newlib/libc/sys/w65/syscalls.c
newlib/libc/sys/w65/trap.c
newlib/libc/sys/z8ksim/Makefile.am
newlib/libc/sys/z8ksim/Makefile.in
newlib/libc/sys/z8ksim/aclocal.m4
newlib/libc/sys/z8ksim/configure
newlib/libc/sys/z8ksim/configure.in
newlib/libc/sys/z8ksim/crt0.c
newlib/libc/sys/z8ksim/glue.c
newlib/libc/sys/z8ksim/sys/syscall.h
newlib/libc/syscalls/Makefile.am
newlib/libc/syscalls/Makefile.in
newlib/libc/syscalls/sysclose.c
newlib/libc/syscalls/sysexecve.c
newlib/libc/syscalls/sysfcntl.c
newlib/libc/syscalls/sysfork.c
newlib/libc/syscalls/sysfstat.c
newlib/libc/syscalls/sysgetpid.c
newlib/libc/syscalls/sysgettod.c
newlib/libc/syscalls/syskill.c
newlib/libc/syscalls/syslink.c
newlib/libc/syscalls/syslseek.c
newlib/libc/syscalls/sysopen.c
newlib/libc/syscalls/sysread.c
newlib/libc/syscalls/syssbrk.c
newlib/libc/syscalls/sysstat.c
newlib/libc/syscalls/systimes.c
newlib/libc/syscalls/sysunlink.c
newlib/libc/syscalls/syswait.c
newlib/libc/syscalls/syswrite.c
newlib/libc/time/Makefile.am
newlib/libc/time/Makefile.in
newlib/libc/time/asctime.c
newlib/libc/time/asctime_r.c
newlib/libc/time/clock.c
newlib/libc/time/ctime.c
newlib/libc/time/ctime_r.c
newlib/libc/time/difftime.c
newlib/libc/time/gmtime.c
newlib/libc/time/gmtime_r.c
newlib/libc/time/lcltime.c
newlib/libc/time/lcltime_r.c
newlib/libc/time/mktime.c
newlib/libc/time/strftime.c
newlib/libc/time/time.c
newlib/libc/time/time.tex
newlib/libc/unix/Makefile.am
newlib/libc/unix/Makefile.in
newlib/libc/unix/getcwd.c
newlib/libc/unix/getlogin.c
newlib/libc/unix/getpass.c
newlib/libc/unix/getpwent.c
newlib/libc/unix/getut.c
newlib/libc/unix/sigset.c
newlib/libc/unix/ttyname.c
newlib/libm/Makefile.am
newlib/libm/Makefile.in
newlib/libm/aclocal.m4
newlib/libm/common/Makefile.am
newlib/libm/common/Makefile.in
newlib/libm/common/common.tex
newlib/libm/common/fdlibm.h
newlib/libm/common/s_cbrt.c
newlib/libm/common/s_copysign.c
newlib/libm/common/s_expm1.c
newlib/libm/common/s_finite.c
newlib/libm/common/s_ilogb.c
newlib/libm/common/s_infinity.c
newlib/libm/common/s_lib_ver.c
newlib/libm/common/s_log1p.c
newlib/libm/common/s_logb.c
newlib/libm/common/s_matherr.c
newlib/libm/common/s_modf.c
newlib/libm/common/s_nan.c
newlib/libm/common/s_nextafter.c
newlib/libm/common/s_rint.c
newlib/libm/common/s_scalbn.c
newlib/libm/common/sf_cbrt.c
newlib/libm/common/sf_copysign.c
newlib/libm/common/sf_expm1.c
newlib/libm/common/sf_finite.c
newlib/libm/common/sf_ilogb.c
newlib/libm/common/sf_infinity.c
newlib/libm/common/sf_log1p.c
newlib/libm/common/sf_logb.c
newlib/libm/common/sf_modf.c
newlib/libm/common/sf_nan.c
newlib/libm/common/sf_nextafter.c
newlib/libm/common/sf_rint.c
newlib/libm/common/sf_scalbn.c
newlib/libm/config.h.in
newlib/libm/configure
newlib/libm/configure.in
newlib/libm/libm.texinfo
newlib/libm/machine/Makefile.am
newlib/libm/machine/Makefile.in
newlib/libm/machine/aclocal.m4
newlib/libm/machine/configure
newlib/libm/machine/configure.in
newlib/libm/machine/i386/Makefile.am
newlib/libm/machine/i386/Makefile.in
newlib/libm/machine/i386/aclocal.m4
newlib/libm/machine/i386/configure
newlib/libm/machine/i386/configure.in
newlib/libm/machine/i386/f_atan2.S
newlib/libm/machine/i386/f_atan2f.S
newlib/libm/machine/i386/f_exp.c
newlib/libm/machine/i386/f_expf.c
newlib/libm/machine/i386/f_frexp.S
newlib/libm/machine/i386/f_frexpf.S
newlib/libm/machine/i386/f_ldexp.S
newlib/libm/machine/i386/f_ldexpf.S
newlib/libm/machine/i386/f_log.S
newlib/libm/machine/i386/f_log10.S
newlib/libm/machine/i386/f_log10f.S
newlib/libm/machine/i386/f_logf.S
newlib/libm/machine/i386/f_math.h
newlib/libm/machine/i386/f_pow.c
newlib/libm/machine/i386/f_powf.c
newlib/libm/machine/i386/f_tan.S
newlib/libm/machine/i386/f_tanf.S
newlib/libm/machine/i386/i386mach.h
newlib/libm/math/Makefile.am
newlib/libm/math/Makefile.in
newlib/libm/math/e_acos.c
newlib/libm/math/e_acosh.c
newlib/libm/math/e_asin.c
newlib/libm/math/e_atan2.c
newlib/libm/math/e_atanh.c
newlib/libm/math/e_cosh.c
newlib/libm/math/e_exp.c
newlib/libm/math/e_fmod.c
newlib/libm/math/e_hypot.c
newlib/libm/math/e_j0.c
newlib/libm/math/e_j1.c
newlib/libm/math/e_jn.c
newlib/libm/math/e_log.c
newlib/libm/math/e_log10.c
newlib/libm/math/e_pow.c
newlib/libm/math/e_rem_pio2.c
newlib/libm/math/e_remainder.c
newlib/libm/math/e_scalb.c
newlib/libm/math/e_sinh.c
newlib/libm/math/e_sqrt.c
newlib/libm/math/ef_acos.c
newlib/libm/math/ef_acosh.c
newlib/libm/math/ef_asin.c
newlib/libm/math/ef_atan2.c
newlib/libm/math/ef_atanh.c
newlib/libm/math/ef_cosh.c
newlib/libm/math/ef_exp.c
newlib/libm/math/ef_fmod.c
newlib/libm/math/ef_hypot.c
newlib/libm/math/ef_j0.c
newlib/libm/math/ef_j1.c
newlib/libm/math/ef_jn.c
newlib/libm/math/ef_log.c
newlib/libm/math/ef_log10.c
newlib/libm/math/ef_pow.c
newlib/libm/math/ef_rem_pio2.c
newlib/libm/math/ef_remainder.c
newlib/libm/math/ef_scalb.c
newlib/libm/math/ef_sinh.c
newlib/libm/math/ef_sqrt.c
newlib/libm/math/er_gamma.c
newlib/libm/math/er_lgamma.c
newlib/libm/math/erf_gamma.c
newlib/libm/math/erf_lgamma.c
newlib/libm/math/k_cos.c
newlib/libm/math/k_rem_pio2.c
newlib/libm/math/k_sin.c
newlib/libm/math/k_standard.c
newlib/libm/math/k_tan.c
newlib/libm/math/kf_cos.c
newlib/libm/math/kf_rem_pio2.c
newlib/libm/math/kf_sin.c
newlib/libm/math/kf_tan.c
newlib/libm/math/math.tex
newlib/libm/math/s_asinh.c
newlib/libm/math/s_atan.c
newlib/libm/math/s_ceil.c
newlib/libm/math/s_cos.c
newlib/libm/math/s_erf.c
newlib/libm/math/s_fabs.c
newlib/libm/math/s_floor.c
newlib/libm/math/s_frexp.c
newlib/libm/math/s_infconst.c
newlib/libm/math/s_isinf.c
newlib/libm/math/s_isnan.c
newlib/libm/math/s_ldexp.c
newlib/libm/math/s_signif.c
newlib/libm/math/s_sin.c
newlib/libm/math/s_tan.c
newlib/libm/math/s_tanh.c
newlib/libm/math/sf_asinh.c
newlib/libm/math/sf_atan.c
newlib/libm/math/sf_ceil.c
newlib/libm/math/sf_cos.c
newlib/libm/math/sf_erf.c
newlib/libm/math/sf_fabs.c
newlib/libm/math/sf_floor.c
newlib/libm/math/sf_frexp.c
newlib/libm/math/sf_isinf.c
newlib/libm/math/sf_isnan.c
newlib/libm/math/sf_ldexp.c
newlib/libm/math/sf_signif.c
newlib/libm/math/sf_sin.c
newlib/libm/math/sf_tan.c
newlib/libm/math/sf_tanh.c
newlib/libm/math/w_acos.c
newlib/libm/math/w_acosh.c
newlib/libm/math/w_asin.c
newlib/libm/math/w_atan2.c
newlib/libm/math/w_atanh.c
newlib/libm/math/w_cabs.c
newlib/libm/math/w_cosh.c
newlib/libm/math/w_drem.c
newlib/libm/math/w_exp.c
newlib/libm/math/w_fmod.c
newlib/libm/math/w_gamma.c
newlib/libm/math/w_hypot.c
newlib/libm/math/w_j0.c
newlib/libm/math/w_j1.c
newlib/libm/math/w_jn.c
newlib/libm/math/w_lgamma.c
newlib/libm/math/w_log.c
newlib/libm/math/w_log10.c
newlib/libm/math/w_pow.c
newlib/libm/math/w_remainder.c
newlib/libm/math/w_scalb.c
newlib/libm/math/w_sinh.c
newlib/libm/math/w_sqrt.c
newlib/libm/math/wf_acos.c
newlib/libm/math/wf_acosh.c
newlib/libm/math/wf_asin.c
newlib/libm/math/wf_atan2.c
newlib/libm/math/wf_atanh.c
newlib/libm/math/wf_cabs.c
newlib/libm/math/wf_cosh.c
newlib/libm/math/wf_drem.c
newlib/libm/math/wf_exp.c
newlib/libm/math/wf_fmod.c
newlib/libm/math/wf_gamma.c
newlib/libm/math/wf_hypot.c
newlib/libm/math/wf_j0.c
newlib/libm/math/wf_j1.c
newlib/libm/math/wf_jn.c
newlib/libm/math/wf_lgamma.c
newlib/libm/math/wf_log.c
newlib/libm/math/wf_log10.c
newlib/libm/math/wf_pow.c
newlib/libm/math/wf_remainder.c
newlib/libm/math/wf_scalb.c
newlib/libm/math/wf_sinh.c
newlib/libm/math/wf_sqrt.c
newlib/libm/math/wr_gamma.c
newlib/libm/math/wr_lgamma.c
newlib/libm/math/wrf_gamma.c
newlib/libm/math/wrf_lgamma.c
newlib/libm/mathfp/Makefile.am
newlib/libm/mathfp/Makefile.in
newlib/libm/mathfp/e_acosh.c
newlib/libm/mathfp/e_atanh.c
newlib/libm/mathfp/e_hypot.c
newlib/libm/mathfp/e_j0.c
newlib/libm/mathfp/e_j1.c
newlib/libm/mathfp/e_remainder.c
newlib/libm/mathfp/e_scalb.c
newlib/libm/mathfp/ef_acosh.c
newlib/libm/mathfp/ef_atanh.c
newlib/libm/mathfp/ef_hypot.c
newlib/libm/mathfp/ef_j0.c
newlib/libm/mathfp/ef_j1.c
newlib/libm/mathfp/ef_remainder.c
newlib/libm/mathfp/ef_scalb.c
newlib/libm/mathfp/er_gamma.c
newlib/libm/mathfp/er_lgamma.c
newlib/libm/mathfp/erf_gamma.c
newlib/libm/mathfp/erf_lgamma.c
newlib/libm/mathfp/mathfp.tex
newlib/libm/mathfp/s_acos.c
newlib/libm/mathfp/s_asin.c
newlib/libm/mathfp/s_asine.c
newlib/libm/mathfp/s_asinh.c
newlib/libm/mathfp/s_atan.c
newlib/libm/mathfp/s_atan2.c
newlib/libm/mathfp/s_atangent.c
newlib/libm/mathfp/s_ceil.c
newlib/libm/mathfp/s_cos.c
newlib/libm/mathfp/s_cosh.c
newlib/libm/mathfp/s_erf.c
newlib/libm/mathfp/s_exp.c
newlib/libm/mathfp/s_fabs.c
newlib/libm/mathfp/s_floor.c
newlib/libm/mathfp/s_fmod.c
newlib/libm/mathfp/s_frexp.c
newlib/libm/mathfp/s_infconst.c
newlib/libm/mathfp/s_isinf.c
newlib/libm/mathfp/s_isnan.c
newlib/libm/mathfp/s_ispos.c
newlib/libm/mathfp/s_ldexp.c
newlib/libm/mathfp/s_log.c
newlib/libm/mathfp/s_log10.c
newlib/libm/mathfp/s_logarithm.c
newlib/libm/mathfp/s_mathcnst.c
newlib/libm/mathfp/s_numtest.c
newlib/libm/mathfp/s_pow.c
newlib/libm/mathfp/s_signif.c
newlib/libm/mathfp/s_sin.c
newlib/libm/mathfp/s_sine.c
newlib/libm/mathfp/s_sineh.c
newlib/libm/mathfp/s_sinf.c
newlib/libm/mathfp/s_sinh.c
newlib/libm/mathfp/s_sqrt.c
newlib/libm/mathfp/s_tan.c
newlib/libm/mathfp/s_tanh.c
newlib/libm/mathfp/sf_acos.c
newlib/libm/mathfp/sf_asin.c
newlib/libm/mathfp/sf_asine.c
newlib/libm/mathfp/sf_asinh.c
newlib/libm/mathfp/sf_atan.c
newlib/libm/mathfp/sf_atan2.c
newlib/libm/mathfp/sf_atangent.c
newlib/libm/mathfp/sf_ceil.c
newlib/libm/mathfp/sf_cos.c
newlib/libm/mathfp/sf_cosh.c
newlib/libm/mathfp/sf_erf.c
newlib/libm/mathfp/sf_exp.c
newlib/libm/mathfp/sf_fabs.c
newlib/libm/mathfp/sf_floor.c
newlib/libm/mathfp/sf_fmod.c
newlib/libm/mathfp/sf_frexp.c
newlib/libm/mathfp/sf_isinf.c
newlib/libm/mathfp/sf_isnan.c
newlib/libm/mathfp/sf_ispos.c
newlib/libm/mathfp/sf_ldexp.c
newlib/libm/mathfp/sf_log.c
newlib/libm/mathfp/sf_log10.c
newlib/libm/mathfp/sf_logarithm.c
newlib/libm/mathfp/sf_numtest.c
newlib/libm/mathfp/sf_pow.c
newlib/libm/mathfp/sf_signif.c
newlib/libm/mathfp/sf_sin.c
newlib/libm/mathfp/sf_sine.c
newlib/libm/mathfp/sf_sineh.c
newlib/libm/mathfp/sf_sinh.c
newlib/libm/mathfp/sf_sqrt.c
newlib/libm/mathfp/sf_tan.c
newlib/libm/mathfp/sf_tanh.c
newlib/libm/mathfp/w_cabs.c
newlib/libm/mathfp/w_drem.c
newlib/libm/mathfp/w_jn.c
newlib/libm/mathfp/wf_cabs.c
newlib/libm/mathfp/wf_drem.c
newlib/libm/mathfp/wf_jn.c
newlib/libm/mathfp/zmath.h
newlib/libm/test/Makefile.in
newlib/libm/test/acos_vec.c
newlib/libm/test/acosf_vec.c
newlib/libm/test/acosh_vec.c
newlib/libm/test/acoshf_vec.c
newlib/libm/test/asin_vec.c
newlib/libm/test/asinf_vec.c
newlib/libm/test/asinh_vec.c
newlib/libm/test/asinhf_vec.c
newlib/libm/test/atan2_vec.c
newlib/libm/test/atan2f_vec.c
newlib/libm/test/atan_vec.c
newlib/libm/test/atanf_vec.c
newlib/libm/test/atanh_vec.c
newlib/libm/test/atanhf_vec.c
newlib/libm/test/ceil_vec.c
newlib/libm/test/ceilf_vec.c
newlib/libm/test/conv_vec.c
newlib/libm/test/convert.c
newlib/libm/test/cos_vec.c
newlib/libm/test/cosf_vec.c
newlib/libm/test/cosh_vec.c
newlib/libm/test/coshf_vec.c
newlib/libm/test/dcvt.c
newlib/libm/test/dvec.c
newlib/libm/test/erf_vec.c
newlib/libm/test/erfc_vec.c
newlib/libm/test/erfcf_vec.c
newlib/libm/test/erff_vec.c
newlib/libm/test/exp_vec.c
newlib/libm/test/expf_vec.c
newlib/libm/test/fabs_vec.c
newlib/libm/test/fabsf_vec.c
newlib/libm/test/floor_vec.c
newlib/libm/test/floorf_vec.c
newlib/libm/test/fmod_vec.c
newlib/libm/test/fmodf_vec.c
newlib/libm/test/gamma_vec.c
newlib/libm/test/gammaf_vec.c
newlib/libm/test/hypot_vec.c
newlib/libm/test/hypotf_vec.c
newlib/libm/test/iconv_vec.c
newlib/libm/test/j0_vec.c
newlib/libm/test/j0f_vec.c
newlib/libm/test/j1_vec.c
newlib/libm/test/j1f_vec.c
newlib/libm/test/jn_vec.c
newlib/libm/test/jnf_vec.c
newlib/libm/test/log10_vec.c
newlib/libm/test/log10f_vec.c
newlib/libm/test/log1p_vec.c
newlib/libm/test/log1pf_vec.c
newlib/libm/test/log2_vec.c
newlib/libm/test/log2f_vec.c
newlib/libm/test/log_vec.c
newlib/libm/test/logf_vec.c
newlib/libm/test/math.c
newlib/libm/test/math2.c
newlib/libm/test/sin_vec.c
newlib/libm/test/sinf_vec.c
newlib/libm/test/sinh_vec.c
newlib/libm/test/sinhf_vec.c
newlib/libm/test/sprint_ivec.c
newlib/libm/test/sprint_vec.c
newlib/libm/test/sqrt_vec.c
newlib/libm/test/sqrtf_vec.c
newlib/libm/test/string.c
newlib/libm/test/tan_vec.c
newlib/libm/test/tanf_vec.c
newlib/libm/test/tanh_vec.c
newlib/libm/test/tanhf_vec.c
newlib/libm/test/test.c
newlib/libm/test/test.h
newlib/libm/test/test_ieee.c
newlib/libm/test/test_is.c
newlib/libm/test/y0_vec.c
newlib/libm/test/y0f_vec.c
newlib/libm/test/y1_vec.c
newlib/libm/test/y1f_vec.c
newlib/libm/test/yn_vec.c
newlib/libm/test/ynf_vec.c
setup.com
symlink-tree
texinfo/texinfo.tex
winsup/CYGWIN_LICENSE
winsup/ChangeLog
winsup/MAINTAINERS
winsup/Makefile.common
winsup/Makefile.in
winsup/bz2lib/CHANGES
winsup/bz2lib/ChangeLog
winsup/bz2lib/LICENSE
winsup/bz2lib/Makefile
winsup/bz2lib/Makefile-libbz2_so
winsup/bz2lib/Makefile.in
winsup/bz2lib/README
winsup/bz2lib/README.COMPILATION.PROBLEMS
winsup/bz2lib/Y2K_INFO
winsup/bz2lib/aclocal.m4
winsup/bz2lib/blocksort.c
winsup/bz2lib/bzip2.1
winsup/bz2lib/bzip2.1.preformatted
winsup/bz2lib/bzip2.c
winsup/bz2lib/bzip2.txt
winsup/bz2lib/bzip2recover.c
winsup/bz2lib/bzlib.c
winsup/bz2lib/bzlib.h
winsup/bz2lib/bzlib_private.h
winsup/bz2lib/compress.c
winsup/bz2lib/configure
winsup/bz2lib/configure.in
winsup/bz2lib/crctable.c
winsup/bz2lib/decompress.c
winsup/bz2lib/dlltest.c
winsup/bz2lib/dlltest.dsp
winsup/bz2lib/huffman.c
winsup/bz2lib/libbz2.def
winsup/bz2lib/libbz2.dsp
winsup/bz2lib/makefile.msc
winsup/bz2lib/manual.ps
winsup/bz2lib/manual.texi
winsup/bz2lib/manual_1.html
winsup/bz2lib/manual_2.html
winsup/bz2lib/manual_3.html
winsup/bz2lib/manual_4.html
winsup/bz2lib/manual_toc.html
winsup/bz2lib/randtable.c
winsup/bz2lib/sample1.bz2
winsup/bz2lib/sample1.ref
winsup/bz2lib/sample2.bz2
winsup/bz2lib/sample2.ref
winsup/bz2lib/sample3.bz2
winsup/bz2lib/sample3.ref
winsup/bz2lib/spewG.c
winsup/bz2lib/unzcrash.c
winsup/bz2lib/words0
winsup/bz2lib/words1
winsup/bz2lib/words2
winsup/bz2lib/words3
winsup/configure
winsup/configure.in
winsup/doc/ChangeLog
winsup/doc/Makefile.in
winsup/doc/calls.texinfo
winsup/doc/changes.texinfo
winsup/doc/configure
winsup/doc/configure.in
winsup/doc/copy.texinfo
winsup/doc/cygwin-api.in.sgml
winsup/doc/cygwin-ug-net.in.sgml
winsup/doc/cygwin-ug.in.sgml
winsup/doc/cygwinenv.sgml
winsup/doc/dll.sgml
winsup/doc/doctool.c
winsup/doc/doctool.txt
winsup/doc/faq.texinfo
winsup/doc/fhandler-tut.txt
winsup/doc/filemodes.sgml
winsup/doc/gcc.sgml
winsup/doc/gdb.sgml
winsup/doc/history.texinfo
winsup/doc/how-api.texinfo
winsup/doc/how-programming.texinfo
winsup/doc/how-resources.texinfo
winsup/doc/how-using.texinfo
winsup/doc/how.texinfo
winsup/doc/install.texinfo
winsup/doc/legal.sgml
winsup/doc/ntsec.sgml
winsup/doc/overview.sgml
winsup/doc/overview2.sgml
winsup/doc/pathnames.sgml
winsup/doc/programming.sgml
winsup/doc/readme.texinfo
winsup/doc/relnotes.texinfo
winsup/doc/setup-net.sgml
winsup/doc/setup.sgml
winsup/doc/setup2.sgml
winsup/doc/textbinary.sgml
winsup/doc/using.sgml
winsup/doc/what.texinfo
winsup/doc/who.texinfo
winsup/doc/windres.sgml
winsup/mingw/CRT_noglob.c
winsup/mingw/CRTfmode.c
winsup/mingw/CRTglob.c
winsup/mingw/CRTinit.c
winsup/mingw/ChangeLog
winsup/mingw/Makefile.in
winsup/mingw/README
winsup/mingw/TODO
winsup/mingw/config.guess
winsup/mingw/config.sub
winsup/mingw/configure
winsup/mingw/configure.in
winsup/mingw/crt1.c
winsup/mingw/crtdll.def
winsup/mingw/crtmt.c
winsup/mingw/crtst.c
winsup/mingw/ctype_old.c
winsup/mingw/dirent.c
winsup/mingw/dllcrt1.c
winsup/mingw/dllmain.c
winsup/mingw/gccmain.c
winsup/mingw/include/_mingw.h
winsup/mingw/include/assert.h
winsup/mingw/include/conio.h
winsup/mingw/include/ctype.h
winsup/mingw/include/dir.h
winsup/mingw/include/direct.h
winsup/mingw/include/dirent.h
winsup/mingw/include/dos.h
winsup/mingw/include/errno.h
winsup/mingw/include/excpt.h
winsup/mingw/include/fcntl.h
winsup/mingw/include/float.h
winsup/mingw/include/io.h
winsup/mingw/include/limits.h
winsup/mingw/include/locale.h
winsup/mingw/include/malloc.h
winsup/mingw/include/math.h
winsup/mingw/include/mem.h
winsup/mingw/include/memory.h
winsup/mingw/include/process.h
winsup/mingw/include/setjmp.h
winsup/mingw/include/share.h
winsup/mingw/include/signal.h
winsup/mingw/include/stdarg.h
winsup/mingw/include/stddef.h
winsup/mingw/include/stdint.h
winsup/mingw/include/stdio.h
winsup/mingw/include/stdlib.h
winsup/mingw/include/string.h
winsup/mingw/include/strings.h
winsup/mingw/include/sys/fcntl.h
winsup/mingw/include/sys/file.h
winsup/mingw/include/sys/locking.h
winsup/mingw/include/sys/stat.h
winsup/mingw/include/sys/time.h
winsup/mingw/include/sys/timeb.h
winsup/mingw/include/sys/types.h
winsup/mingw/include/sys/unistd.h
winsup/mingw/include/sys/utime.h
winsup/mingw/include/tchar.h
winsup/mingw/include/time.h
winsup/mingw/include/unistd.h
winsup/mingw/include/values.h
winsup/mingw/include/varargs.h
winsup/mingw/include/wchar.h
winsup/mingw/include/wctype.h
winsup/mingw/init.c
winsup/mingw/install-sh
winsup/mingw/jamfile
winsup/mingw/main.c
winsup/mingw/mkinstalldirs
winsup/mingw/moldname-crtdll.def
winsup/mingw/moldname-msvcrt.def
winsup/mingw/moldname.def
winsup/mingw/moldname.def.in
winsup/mingw/msvcrt.def
winsup/mingw/msvcrt20.def
winsup/mingw/msvcrt40.def
winsup/mingw/mthr.c
winsup/mingw/mthr_init.c
winsup/mingw/mthr_stub.c
winsup/mingw/profile/Makefile.in
winsup/mingw/profile/configure
winsup/mingw/profile/configure.in
winsup/mingw/profile/gcrt0.c
winsup/mingw/profile/gmon.c
winsup/mingw/profile/gmon.h
winsup/mingw/profile/mcount.c
winsup/mingw/profile/profil.c
winsup/mingw/profile/profil.h
winsup/mingw/profile/profile.h
winsup/mingw/readme.txt
winsup/mingw/samples/dirent/jamfile
winsup/mingw/samples/dirent/test.c
winsup/mingw/samples/dlltest/dll.c
winsup/mingw/samples/dlltest/dll.def
winsup/mingw/samples/dlltest/dll.h
winsup/mingw/samples/dlltest/exe.c
winsup/mingw/samples/dlltest/exe.exp
winsup/mingw/samples/dlltest/expexe.c
winsup/mingw/samples/dlltest/expexe.def
winsup/mingw/samples/dlltest/jamfile
winsup/mingw/samples/dlltest/loaddll.c
winsup/mingw/samples/dlltest/loadexe.c
winsup/mingw/samples/dlltest/readme.txt
winsup/mingw/samples/dlltest/silly.cpp
winsup/mingw/samples/dlltest/silly.def
winsup/mingw/samples/dlltest/silly.exp
winsup/mingw/samples/dlltest/silly.h
winsup/mingw/samples/dlltest/sillydll.cpp
winsup/mingw/samples/filehand/filehand.c
winsup/mingw/samples/filehand/jamfile
winsup/mingw/samples/filehand/junk.txt
winsup/mingw/samples/fixargv/fixargv.c
winsup/mingw/samples/fixargv/fixargv.h
winsup/mingw/samples/fixargv/readme.txt
winsup/mingw/samples/fmode/all.c
winsup/mingw/samples/fmode/jamfile
winsup/mingw/samples/fmode/readme.txt
winsup/mingw/samples/fmode/test.c
winsup/mingw/samples/globbing/glob.c
winsup/mingw/samples/globbing/jamfile
winsup/mingw/samples/globbing/noglob.c
winsup/mingw/samples/globbing/readme.txt
winsup/mingw/samples/print/jamfile
winsup/mingw/samples/print/prntest.c
winsup/mingw/samples/seh/eh3.c
winsup/mingw/samples/seh/exutil.c
winsup/mingw/samples/seh/exutil.def
winsup/mingw/samples/seh/exutil.h
winsup/mingw/samples/seh/jamfile
winsup/mingw/samples/seh/sehfix.c
winsup/mingw/samples/seh/sehsub.c
winsup/mingw/samples/seh/sehtest.c
winsup/mingw/samples/simpledll/dll.c
winsup/mingw/samples/simpledll/dll.cpp
winsup/mingw/samples/simpledll/dll.def
winsup/mingw/samples/simpledll/exe.c
winsup/mingw/samples/simpledll/jamfile
winsup/mingw/samples/simpledll/makedll.bat
winsup/mingw/samples/test/jamfile
winsup/mingw/samples/test/test.c
winsup/mingw/samples/wintest/jamfile
winsup/mingw/samples/wintest/test.c
winsup/mingw/string_old.c
winsup/subauth/ChangeLog
winsup/subauth/Makefile.in
winsup/subauth/configure
winsup/subauth/configure.in
winsup/subauth/cygsuba.c
winsup/subauth/cygsuba.din
winsup/testsuite/ChangeLog
winsup/testsuite/Makefile.in
winsup/testsuite/README
winsup/testsuite/config/default.exp
winsup/testsuite/configure
winsup/testsuite/configure.in
winsup/testsuite/libltp/include/dataascii.h
winsup/testsuite/libltp/include/databin.h
winsup/testsuite/libltp/include/file_lock.h
winsup/testsuite/libltp/include/forker.h
winsup/testsuite/libltp/include/open_flags.h
winsup/testsuite/libltp/include/pattern.h
winsup/testsuite/libltp/include/random_range.h
winsup/testsuite/libltp/include/rmobj.h
winsup/testsuite/libltp/include/search_path.h
winsup/testsuite/libltp/include/str_to_bytes.h
winsup/testsuite/libltp/include/string_to_tokens.h
winsup/testsuite/libltp/include/test.h
winsup/testsuite/libltp/include/tlibio.h
winsup/testsuite/libltp/include/usctest.h
winsup/testsuite/libltp/include/write_log.h
winsup/testsuite/libltp/lib/dataascii.c
winsup/testsuite/libltp/lib/databin.c
winsup/testsuite/libltp/lib/datapid.c
winsup/testsuite/libltp/lib/forker.c
winsup/testsuite/libltp/lib/get_high_address.c
winsup/testsuite/libltp/lib/libtestsuite.c
winsup/testsuite/libltp/lib/open_flags.c
winsup/testsuite/libltp/lib/parse_opts.c
winsup/testsuite/libltp/lib/pattern.c
winsup/testsuite/libltp/lib/rmobj.c
winsup/testsuite/libltp/lib/search_path.c
winsup/testsuite/libltp/lib/str_to_bytes.c
winsup/testsuite/libltp/lib/string_to_tokens.c
winsup/testsuite/libltp/lib/tst_res.c
winsup/testsuite/libltp/lib/tst_sig.c
winsup/testsuite/libltp/lib/tst_tmpdir.c
winsup/testsuite/libltp/lib/write_log.c
winsup/testsuite/winsup.api/checksignal.c
winsup/testsuite/winsup.api/crlf.c
winsup/testsuite/winsup.api/devzero.c
winsup/testsuite/winsup.api/iospeed.c
winsup/testsuite/winsup.api/known_bugs.tcl
winsup/testsuite/winsup.api/ltp/access01.c
winsup/testsuite/winsup.api/ltp/access03.c
winsup/testsuite/winsup.api/ltp/access04.c
winsup/testsuite/winsup.api/ltp/access05.c
winsup/testsuite/winsup.api/ltp/alarm01.c
winsup/testsuite/winsup.api/ltp/alarm02.c
winsup/testsuite/winsup.api/ltp/alarm03.c
winsup/testsuite/winsup.api/ltp/alarm07.c
winsup/testsuite/winsup.api/ltp/asyncio02.c
winsup/testsuite/winsup.api/ltp/chdir02.c
winsup/testsuite/winsup.api/ltp/chdir04.c
winsup/testsuite/winsup.api/ltp/chmod01.c
winsup/testsuite/winsup.api/ltp/chmod02.c
winsup/testsuite/winsup.api/ltp/chown01.c
winsup/testsuite/winsup.api/ltp/close01.c
winsup/testsuite/winsup.api/ltp/close02.c
winsup/testsuite/winsup.api/ltp/close08.c
winsup/testsuite/winsup.api/ltp/creat01.c
winsup/testsuite/winsup.api/ltp/creat03.c
winsup/testsuite/winsup.api/ltp/creat09.c
winsup/testsuite/winsup.api/ltp/dup01.c
winsup/testsuite/winsup.api/ltp/dup02.c
winsup/testsuite/winsup.api/ltp/dup03.c
winsup/testsuite/winsup.api/ltp/dup04.c
winsup/testsuite/winsup.api/ltp/dup05.c
winsup/testsuite/winsup.api/ltp/execl01.c
winsup/testsuite/winsup.api/ltp/execle01.c
winsup/testsuite/winsup.api/ltp/execlp01.c
winsup/testsuite/winsup.api/ltp/execv01.c
winsup/testsuite/winsup.api/ltp/execve01.c
winsup/testsuite/winsup.api/ltp/execvp01.c
winsup/testsuite/winsup.api/ltp/exit01.c
winsup/testsuite/winsup.api/ltp/exit02.c
winsup/testsuite/winsup.api/ltp/fchdir01.c
winsup/testsuite/winsup.api/ltp/fchdir02.c
winsup/testsuite/winsup.api/ltp/fchmod01.c
winsup/testsuite/winsup.api/ltp/fchown01.c
winsup/testsuite/winsup.api/ltp/fcntl02.c
winsup/testsuite/winsup.api/ltp/fcntl03.c
winsup/testsuite/winsup.api/ltp/fcntl04.c
winsup/testsuite/winsup.api/ltp/fcntl05.c
winsup/testsuite/winsup.api/ltp/fcntl07.c
winsup/testsuite/winsup.api/ltp/fcntl07B.c
winsup/testsuite/winsup.api/ltp/fcntl08.c
winsup/testsuite/winsup.api/ltp/fcntl09.c
winsup/testsuite/winsup.api/ltp/fcntl10.c
winsup/testsuite/winsup.api/ltp/fork01.c
winsup/testsuite/winsup.api/ltp/fork02.c
winsup/testsuite/winsup.api/ltp/fork03.c
winsup/testsuite/winsup.api/ltp/fork04.c
winsup/testsuite/winsup.api/ltp/fork06.c
winsup/testsuite/winsup.api/ltp/fork07.c
winsup/testsuite/winsup.api/ltp/fork09.c
winsup/testsuite/winsup.api/ltp/fork10.c
winsup/testsuite/winsup.api/ltp/fork11.c
winsup/testsuite/winsup.api/ltp/fpathconf01.c
winsup/testsuite/winsup.api/ltp/fstat01.c
winsup/testsuite/winsup.api/ltp/fstat02.c
winsup/testsuite/winsup.api/ltp/fstat03.c
winsup/testsuite/winsup.api/ltp/fstat04.c
winsup/testsuite/winsup.api/ltp/fsync01.c
winsup/testsuite/winsup.api/ltp/ftruncate01.c
winsup/testsuite/winsup.api/ltp/ftruncate02.c
winsup/testsuite/winsup.api/ltp/ftruncate03.c
winsup/testsuite/winsup.api/ltp/getegid01.c
winsup/testsuite/winsup.api/ltp/geteuid01.c
winsup/testsuite/winsup.api/ltp/getgid01.c
winsup/testsuite/winsup.api/ltp/getgid02.c
winsup/testsuite/winsup.api/ltp/getgid03.c
winsup/testsuite/winsup.api/ltp/getgroups01.c
winsup/testsuite/winsup.api/ltp/getgroups02.c
winsup/testsuite/winsup.api/ltp/gethostid01.c
winsup/testsuite/winsup.api/ltp/gethostname01.c
winsup/testsuite/winsup.api/ltp/getpgid01.c
winsup/testsuite/winsup.api/ltp/getpgid02.c
winsup/testsuite/winsup.api/ltp/getpgrp01.c
winsup/testsuite/winsup.api/ltp/getpid01.c
winsup/testsuite/winsup.api/ltp/getpid02.c
winsup/testsuite/winsup.api/ltp/getppid01.c
winsup/testsuite/winsup.api/ltp/getppid02.c
winsup/testsuite/winsup.api/ltp/getuid01.c
winsup/testsuite/winsup.api/ltp/getuid02.c
winsup/testsuite/winsup.api/ltp/getuid03.c
winsup/testsuite/winsup.api/ltp/kill01.c
winsup/testsuite/winsup.api/ltp/kill02.c
winsup/testsuite/winsup.api/ltp/kill03.c
winsup/testsuite/winsup.api/ltp/kill04.c
winsup/testsuite/winsup.api/ltp/kill09.c
winsup/testsuite/winsup.api/ltp/link02.c
winsup/testsuite/winsup.api/ltp/link03.c
winsup/testsuite/winsup.api/ltp/link04.c
winsup/testsuite/winsup.api/ltp/link05.c
winsup/testsuite/winsup.api/ltp/lseek01.c
winsup/testsuite/winsup.api/ltp/lseek02.c
winsup/testsuite/winsup.api/ltp/lseek03.c
winsup/testsuite/winsup.api/ltp/lseek04.c
winsup/testsuite/winsup.api/ltp/lseek05.c
winsup/testsuite/winsup.api/ltp/lseek06.c
winsup/testsuite/winsup.api/ltp/lseek07.c
winsup/testsuite/winsup.api/ltp/lseek08.c
winsup/testsuite/winsup.api/ltp/lseek09.c
winsup/testsuite/winsup.api/ltp/lseek10.c
winsup/testsuite/winsup.api/ltp/lstat02.c
winsup/testsuite/winsup.api/ltp/mkdir01.c
winsup/testsuite/winsup.api/ltp/mkdir08.c
winsup/testsuite/winsup.api/ltp/mknod01.c
winsup/testsuite/winsup.api/ltp/mmap001.c
winsup/testsuite/winsup.api/ltp/mmap02.c
winsup/testsuite/winsup.api/ltp/mmap03.c
winsup/testsuite/winsup.api/ltp/mmap04.c
winsup/testsuite/winsup.api/ltp/mmap05.c
winsup/testsuite/winsup.api/ltp/mmap06.c
winsup/testsuite/winsup.api/ltp/mmap07.c
winsup/testsuite/winsup.api/ltp/mmap08.c
winsup/testsuite/winsup.api/ltp/munmap01.c
winsup/testsuite/winsup.api/ltp/munmap02.c
winsup/testsuite/winsup.api/ltp/nice05.c
winsup/testsuite/winsup.api/ltp/open02.c
winsup/testsuite/winsup.api/ltp/open03.c
winsup/testsuite/winsup.api/ltp/pathconf01.c
winsup/testsuite/winsup.api/ltp/pause01.c
winsup/testsuite/winsup.api/ltp/pipe01.c
winsup/testsuite/winsup.api/ltp/pipe08.c
winsup/testsuite/winsup.api/ltp/pipe09.c
winsup/testsuite/winsup.api/ltp/pipe10.c
winsup/testsuite/winsup.api/ltp/pipe11.c
winsup/testsuite/winsup.api/ltp/poll01.c
winsup/testsuite/winsup.api/ltp/read01.c
winsup/testsuite/winsup.api/ltp/read04.c
winsup/testsuite/winsup.api/ltp/readdir01.c
winsup/testsuite/winsup.api/ltp/readlink01.c
winsup/testsuite/winsup.api/ltp/readlink02.c
winsup/testsuite/winsup.api/ltp/readlink03.c
winsup/testsuite/winsup.api/ltp/rename01.c
winsup/testsuite/winsup.api/ltp/rename02.c
winsup/testsuite/winsup.api/ltp/rename08.c
winsup/testsuite/winsup.api/ltp/rename10.c
winsup/testsuite/winsup.api/ltp/rmdir01.c
winsup/testsuite/winsup.api/ltp/rmdir04.c
winsup/testsuite/winsup.api/ltp/rmdir05.c
winsup/testsuite/winsup.api/ltp/sbrk01.c
winsup/testsuite/winsup.api/ltp/select01.c
winsup/testsuite/winsup.api/ltp/select02.c
winsup/testsuite/winsup.api/ltp/select03.c
winsup/testsuite/winsup.api/ltp/setgid01.c
winsup/testsuite/winsup.api/ltp/setgroups01.c
winsup/testsuite/winsup.api/ltp/setpgid01.c
winsup/testsuite/winsup.api/ltp/setregid01.c
winsup/testsuite/winsup.api/ltp/setreuid01.c
winsup/testsuite/winsup.api/ltp/setuid01.c
winsup/testsuite/winsup.api/ltp/setuid02.c
winsup/testsuite/winsup.api/ltp/signal03.c
winsup/testsuite/winsup.api/ltp/stat01.c
winsup/testsuite/winsup.api/ltp/stat02.c
winsup/testsuite/winsup.api/ltp/stat03.c
winsup/testsuite/winsup.api/ltp/stat05.c
winsup/testsuite/winsup.api/ltp/stat06.c
winsup/testsuite/winsup.api/ltp/symlink01.c
winsup/testsuite/winsup.api/ltp/symlink02.c
winsup/testsuite/winsup.api/ltp/symlink03.c
winsup/testsuite/winsup.api/ltp/symlink04.c
winsup/testsuite/winsup.api/ltp/symlink05.c
winsup/testsuite/winsup.api/ltp/sync01.c
winsup/testsuite/winsup.api/ltp/sync02.c
winsup/testsuite/winsup.api/ltp/time01.c
winsup/testsuite/winsup.api/ltp/time02.c
winsup/testsuite/winsup.api/ltp/times01.c
winsup/testsuite/winsup.api/ltp/times02.c
winsup/testsuite/winsup.api/ltp/times03.c
winsup/testsuite/winsup.api/ltp/truncate01.c
winsup/testsuite/winsup.api/ltp/truncate02.c
winsup/testsuite/winsup.api/ltp/ulimit01.c
winsup/testsuite/winsup.api/ltp/umask01.c
winsup/testsuite/winsup.api/ltp/umask02.c
winsup/testsuite/winsup.api/ltp/umask03.c
winsup/testsuite/winsup.api/ltp/uname01.c
winsup/testsuite/winsup.api/ltp/unlink05.c
winsup/testsuite/winsup.api/ltp/unlink06.c
winsup/testsuite/winsup.api/ltp/unlink07.c
winsup/testsuite/winsup.api/ltp/unlink08.c
winsup/testsuite/winsup.api/ltp/vfork01.c
winsup/testsuite/winsup.api/ltp/wait02.c
winsup/testsuite/winsup.api/ltp/wait401.c
winsup/testsuite/winsup.api/ltp/wait402.c
winsup/testsuite/winsup.api/ltp/write01.c
winsup/testsuite/winsup.api/ltp/write02.c
winsup/testsuite/winsup.api/ltp/write03.c
winsup/testsuite/winsup.api/mmaptest01.c
winsup/testsuite/winsup.api/mmaptest02.c
winsup/testsuite/winsup.api/mmaptest03.c
winsup/testsuite/winsup.api/mmaptest04.c
winsup/testsuite/winsup.api/nullgetcwd.c
winsup/testsuite/winsup.api/pthread/cleanup2.c
winsup/testsuite/winsup.api/pthread/cleanup3.c
winsup/testsuite/winsup.api/pthread/condvar1.c
winsup/testsuite/winsup.api/pthread/condvar2.c
winsup/testsuite/winsup.api/pthread/condvar2_1.c
winsup/testsuite/winsup.api/pthread/condvar3.c
winsup/testsuite/winsup.api/pthread/condvar3_1.c
winsup/testsuite/winsup.api/pthread/condvar3_2.c
winsup/testsuite/winsup.api/pthread/condvar3_3.c
winsup/testsuite/winsup.api/pthread/condvar4.c
winsup/testsuite/winsup.api/pthread/condvar5.c
winsup/testsuite/winsup.api/pthread/condvar6.c
winsup/testsuite/winsup.api/pthread/condvar8.c
winsup/testsuite/winsup.api/pthread/count1.c
winsup/testsuite/winsup.api/pthread/create1.c
winsup/testsuite/winsup.api/pthread/create2.c
winsup/testsuite/winsup.api/pthread/equal1.c
winsup/testsuite/winsup.api/pthread/exit1.c
winsup/testsuite/winsup.api/pthread/exit2.c
winsup/testsuite/winsup.api/pthread/exit3.c
winsup/testsuite/winsup.api/pthread/inherit1.c
winsup/testsuite/winsup.api/pthread/join0.c
winsup/testsuite/winsup.api/pthread/join1.c
winsup/testsuite/winsup.api/pthread/join2.c
winsup/testsuite/winsup.api/pthread/mutex1.c
winsup/testsuite/winsup.api/pthread/mutex1r.c
winsup/testsuite/winsup.api/pthread/mutex2.c
winsup/testsuite/winsup.api/pthread/mutex3.c
winsup/testsuite/winsup.api/pthread/mutex6r.c
winsup/testsuite/winsup.api/pthread/once1.c
winsup/testsuite/winsup.api/pthread/priority1.c
winsup/testsuite/winsup.api/pthread/priority2.c
winsup/testsuite/winsup.api/pthread/self1.c
winsup/testsuite/winsup.api/pthread/self2.c
winsup/testsuite/winsup.api/pthread/test.h
winsup/testsuite/winsup.api/pthread/tsd1.c
winsup/testsuite/winsup.api/samples/sample-fail.c
winsup/testsuite/winsup.api/samples/sample-miscompile.c
winsup/testsuite/winsup.api/samples/sample-pass.c
winsup/testsuite/winsup.api/sigchld.c
winsup/testsuite/winsup.api/signal-into-win32-api.c
winsup/testsuite/winsup.api/systemcall.c
winsup/testsuite/winsup.api/waitpid.c
winsup/testsuite/winsup.api/winsup.exp
winsup/utils/ChangeLog
winsup/utils/ChangeLog-2000
winsup/utils/Makefile.in
winsup/utils/aclocal.m4
winsup/utils/configure
winsup/utils/configure.in
winsup/utils/cygcheck.cc
winsup/utils/cygpath.cc
winsup/utils/dump_setup.cc
winsup/utils/dumper.cc
winsup/utils/dumper.h
winsup/utils/getfacl.c
winsup/utils/kill.cc
winsup/utils/mkgroup.c
winsup/utils/mkpasswd.c
winsup/utils/module_info.cc
winsup/utils/mount.cc
winsup/utils/parse_pe.cc
winsup/utils/passwd.c
winsup/utils/path.cc
winsup/utils/path.h
winsup/utils/ps.cc
winsup/utils/regtool.cc
winsup/utils/setfacl.c
winsup/utils/ssp.c
winsup/utils/ssp.txt
winsup/utils/strace.cc
winsup/utils/umount.cc
winsup/utils/utils.sgml
winsup/w32api/CONTRIBUTIONS
winsup/w32api/ChangeLog
winsup/w32api/Makefile.in
winsup/w32api/README
winsup/w32api/TODO
winsup/w32api/config.guess
winsup/w32api/config.sub
winsup/w32api/configure
winsup/w32api/configure.in
winsup/w32api/include/accctrl.h
winsup/w32api/include/aclapi.h
winsup/w32api/include/basetsd.h
winsup/w32api/include/basetyps.h
winsup/w32api/include/cderr.h
winsup/w32api/include/cguid.h
winsup/w32api/include/commctrl.h
winsup/w32api/include/commdlg.h
winsup/w32api/include/cpl.h
winsup/w32api/include/cplext.h
winsup/w32api/include/custcntl.h
winsup/w32api/include/dbt.h
winsup/w32api/include/dde.h
winsup/w32api/include/ddeml.h
winsup/w32api/include/dlgs.h
winsup/w32api/include/excpt.h
winsup/w32api/include/httpext.h
winsup/w32api/include/imagehlp.h
winsup/w32api/include/imm.h
winsup/w32api/include/initguid.h
winsup/w32api/include/intshcut.h
winsup/w32api/include/ipexport.h
winsup/w32api/include/iphlpapi.h
winsup/w32api/include/ipifcons.h
winsup/w32api/include/iprtrmib.h
winsup/w32api/include/iptypes.h
winsup/w32api/include/isguids.h
winsup/w32api/include/largeint.h
winsup/w32api/include/lm.h
winsup/w32api/include/lmaccess.h
winsup/w32api/include/lmalert.h
winsup/w32api/include/lmapibuf.h
winsup/w32api/include/lmat.h
winsup/w32api/include/lmaudit.h
winsup/w32api/include/lmbrowsr.h
winsup/w32api/include/lmchdev.h
winsup/w32api/include/lmconfig.h
winsup/w32api/include/lmcons.h
winsup/w32api/include/lmerr.h
winsup/w32api/include/lmerrlog.h
winsup/w32api/include/lmmsg.h
winsup/w32api/include/lmremutl.h
winsup/w32api/include/lmrepl.h
winsup/w32api/include/lmserver.h
winsup/w32api/include/lmshare.h
winsup/w32api/include/lmsname.h
winsup/w32api/include/lmstats.h
winsup/w32api/include/lmsvc.h
winsup/w32api/include/lmuse.h
winsup/w32api/include/lmuseflg.h
winsup/w32api/include/lmwksta.h
winsup/w32api/include/lzexpand.h
winsup/w32api/include/mapi.h
winsup/w32api/include/mciavi.h
winsup/w32api/include/mcx.h
winsup/w32api/include/mmsystem.h
winsup/w32api/include/mswsock.h
winsup/w32api/include/nb30.h
winsup/w32api/include/nddeapi.h
winsup/w32api/include/nspapi.h
winsup/w32api/include/ntdef.h
winsup/w32api/include/ntsecapi.h
winsup/w32api/include/ntsecpkg.h
winsup/w32api/include/oaidl.h
winsup/w32api/include/objbase.h
winsup/w32api/include/objfwd.h
winsup/w32api/include/objidl.h
winsup/w32api/include/ocidl.h
winsup/w32api/include/odbcinst.h
winsup/w32api/include/ole.h
winsup/w32api/include/ole2.h
winsup/w32api/include/ole2ver.h
winsup/w32api/include/oleauto.h
winsup/w32api/include/olectl.h
winsup/w32api/include/olectlid.h
winsup/w32api/include/oledlg.h
winsup/w32api/include/oleidl.h
winsup/w32api/include/pbt.h
winsup/w32api/include/poppack.h
winsup/w32api/include/prsht.h
winsup/w32api/include/psapi.h
winsup/w32api/include/pshpack1.h
winsup/w32api/include/pshpack2.h
winsup/w32api/include/pshpack4.h
winsup/w32api/include/pshpack8.h
winsup/w32api/include/rapi.h
winsup/w32api/include/ras.h
winsup/w32api/include/raserror.h
winsup/w32api/include/rassapi.h
winsup/w32api/include/regstr.h
winsup/w32api/include/richedit.h
winsup/w32api/include/richole.h
winsup/w32api/include/rpc.h
winsup/w32api/include/rpcdce.h
winsup/w32api/include/rpcdce2.h
winsup/w32api/include/rpcdcep.h
winsup/w32api/include/rpcndr.h
winsup/w32api/include/rpcnsi.h
winsup/w32api/include/rpcnsip.h
winsup/w32api/include/rpcnterr.h
winsup/w32api/include/rpcproxy.h
winsup/w32api/include/schannel.h
winsup/w32api/include/schnlsp.h
winsup/w32api/include/scrnsave.h
winsup/w32api/include/security.h
winsup/w32api/include/setupapi.h
winsup/w32api/include/shellapi.h
winsup/w32api/include/shlguid.h
winsup/w32api/include/shlobj.h
winsup/w32api/include/sql.h
winsup/w32api/include/sqlext.h
winsup/w32api/include/sqltypes.h
winsup/w32api/include/sqlucode.h
winsup/w32api/include/sspi.h
winsup/w32api/include/subauth.h
winsup/w32api/include/tlhelp32.h
winsup/w32api/include/unknwn.h
winsup/w32api/include/userenv.h
winsup/w32api/include/w32api.h
winsup/w32api/include/winbase.h
winsup/w32api/include/wincon.h
winsup/w32api/include/wincrypt.h
winsup/w32api/include/windef.h
winsup/w32api/include/windows.h
winsup/w32api/include/windowsx.h
winsup/w32api/include/winerror.h
winsup/w32api/include/wingdi.h
winsup/w32api/include/wininet.h
winsup/w32api/include/winioctl.h
winsup/w32api/include/winnetwk.h
winsup/w32api/include/winnls.h
winsup/w32api/include/winnt.h
winsup/w32api/include/winperf.h
winsup/w32api/include/winreg.h
winsup/w32api/include/winresrc.h
winsup/w32api/include/winsock.h
winsup/w32api/include/winsock2.h
winsup/w32api/include/winspool.h
winsup/w32api/include/winsvc.h
winsup/w32api/include/winuser.h
winsup/w32api/include/winver.h
winsup/w32api/include/ws2tcpip.h
winsup/w32api/include/wsnetbs.h
winsup/w32api/include/wtypes.h
winsup/w32api/include/zmouse.h
winsup/w32api/install-sh
winsup/w32api/lib/Makefile.in
winsup/w32api/lib/advapi32.def
winsup/w32api/lib/cap.def
winsup/w32api/lib/comctl32.def
winsup/w32api/lib/comdlg32.def
winsup/w32api/lib/crypt32.def
winsup/w32api/lib/ctl3d32.def
winsup/w32api/lib/d3dim.def
winsup/w32api/lib/d3drm.def
winsup/w32api/lib/d3dxof.def
winsup/w32api/lib/ddraw.def
winsup/w32api/lib/dinput.c
winsup/w32api/lib/dinput.def
winsup/w32api/lib/dlcapi.def
winsup/w32api/lib/dplayx.def
winsup/w32api/lib/dsetup.def
winsup/w32api/lib/dsound.def
winsup/w32api/lib/dxguid.c
winsup/w32api/lib/gdi32.def
winsup/w32api/lib/glaux.def
winsup/w32api/lib/glu32.def
winsup/w32api/lib/glut.def
winsup/w32api/lib/glut32.def
winsup/w32api/lib/imagehlp.def
winsup/w32api/lib/imm32.def
winsup/w32api/lib/iphlpapi.def
winsup/w32api/lib/kernel32.c
winsup/w32api/lib/kernel32.def
winsup/w32api/lib/largeint.c
winsup/w32api/lib/lz32.def
winsup/w32api/lib/mapi32.def
winsup/w32api/lib/mfcuia32.def
winsup/w32api/lib/mgmtapi.def
winsup/w32api/lib/mpr.def
winsup/w32api/lib/msacm32.def
winsup/w32api/lib/msvcp60.def
winsup/w32api/lib/mswsock.def
winsup/w32api/lib/nddeapi.def
winsup/w32api/lib/netapi32.def
winsup/w32api/lib/odbc32.def
winsup/w32api/lib/odbccp32.def
winsup/w32api/lib/ole32.def
winsup/w32api/lib/oleaut32.def
winsup/w32api/lib/olecli32.def
winsup/w32api/lib/oledlg.def
winsup/w32api/lib/olepro32.def
winsup/w32api/lib/olesvr32.def
winsup/w32api/lib/opengl32.def
winsup/w32api/lib/penwin32.def
winsup/w32api/lib/pkpd32.def
winsup/w32api/lib/psapi.def
winsup/w32api/lib/rapi.def
winsup/w32api/lib/rasapi32.def
winsup/w32api/lib/res.rc
winsup/w32api/lib/rpcdce4.def
winsup/w32api/lib/rpcns4.def
winsup/w32api/lib/rpcrt4.def
winsup/w32api/lib/scrnsave.c
winsup/w32api/lib/secur32.def
winsup/w32api/lib/setupapi.def
winsup/w32api/lib/shell32.c
winsup/w32api/lib/shell32.def
winsup/w32api/lib/svrapi.def
winsup/w32api/lib/tapi32.def
winsup/w32api/lib/test.c
winsup/w32api/lib/th32.def
winsup/w32api/lib/thunk32.def
winsup/w32api/lib/url.def
winsup/w32api/lib/user32.def
winsup/w32api/lib/userenv.def
winsup/w32api/lib/uuid.c
winsup/w32api/lib/vdmdbg.def
winsup/w32api/lib/version.def
winsup/w32api/lib/vfw32.def
winsup/w32api/lib/win32spl.def
winsup/w32api/lib/wininet.def
winsup/w32api/lib/winmm.def
winsup/w32api/lib/winspool.def
winsup/w32api/lib/winstrm.def
winsup/w32api/lib/wow32.def
winsup/w32api/lib/ws2_32.def
winsup/w32api/lib/wsock32.def
winsup/w32api/lib/wst.def
ylwrap
Diffstat (limited to 'winsup/utils')
29 files changed, 0 insertions, 12704 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog deleted file mode 100644 index d00f22d1c..000000000 --- a/winsup/utils/ChangeLog +++ /dev/null @@ -1,480 +0,0 @@ -2002-02-27 Christopher Faylor <cgf@redhat.com> - - * ssp.c (help_desk): Fix compiler warning. - -2002-02-27 Joshua Daniel Franklin <joshuadfranklin@yahoo.com> - Christopher Faylor <cgf@redhat.com> - - Change appropriate globals to statics throughout. - * cygcheck.cc (usage): Simplify usage output. Generalize to allow use - for help. - (longopts): Add version option. - (opts): Add 'V" version option. - (print_version): New function. - (main): Accommodate new version option. Accommodate usage parameter - changes. Use usage to output help message. - -002-02-19 Christopher Faylor <cgf@redhat.com> - - * Makefile.in (CXXFLAGS): Add override so that HAVE_DECL_GETOPT is - defined. - (libbfd): Use -B rather than -L so that bfd from build directory is - correctly found. - (libintl): Ditto. - -2002-02-15 Christopher Faylor <cgf@redhat.com> - - * mount.cc (usage): Fix typo in output. - -2002-02-14 Christopher Faylor <cgf@redhat.com> - - * strace.cc (attach_process): Change CW_STRACE_ON to CW_STRACE_TOGGLE. - -2002-01-31 Corinna Vinschen <corinna@vinschen.de> - - * mkpasswd.c (main): Set default home path for 9x/Me if --path-to-home - isn't given. - -2002-01-30 Corinna Vinschen <corinna@vinschen.de> - - * passwd.cc (ChangePW): Add parameter to differ between called for - checking old password and called for changing password. If called - for checking old password, return non-zero only if password is surely - incorrect. - (main): Call ChangePW() with additional parameter. - -2002-01-29 Christopher Faylor <cgf@redhat.com> - - * dump_setup.cc (parse_filename): Don't consider '_' part of the - version. - -2002-01-28 Christopher Faylor <cgf@redhat.com> - - * cygcheck.cc: Fix typo. Remove uid_t kludge. Rely on kludge in - sys/cygwin.h instead. - * getfacl.c: Add include to remove warning. - * mkgroup.c (main): Assign variables outside of parameter passing. - This seems to eliminate some compiler warnings. - -2002-01-28 Christopher Faylor <cgf@redhat.com> - - * cygcheck.cc: Use specific cygwin includes, as required. - -2002-01-28 Christopher Faylor <cgf@redhat.com> - - * Makefile.in (MINGW_INCLUDES): Change cygwin include. - * strace.cc: Use specific cygwin includes, as required. - (load_cygwin): New function. Loads cygwin DLL, if necessary. - (attach_process): Attaches strace to a running process. - (dostrace): Accept pid argument. Attach to pid if supplied. - (usage): Describe -p option. Correct system description. - (longopts): Alphabetize. - (opts): Ditto. - (main): Ditto. Handle -p option. - -2002-01-21 Christopher Faylor <cgf@redhat.com> - - * Makefile.in (CXXFLAGS): Ensure that important settings are preserved - even when overriden by command line. - -2002-01-21 Christopher Faylor <cgf@redhat.com> - - * Makefile.in: Build intermediate cygcheck.o to force use of MINGW_CXXFLAGS. - * cygcheck.cc (cygwin_info): Intitialize variable to quiet g++ warning. - (dump_sysinfo): Make variables unsigned to quiet g++ warnings. - * strace.cc (version_string): Rename from SCCSid. - (add_child): Remove unused variable. - (version): Use version_string. Avoid use of fprintf. - -2002-01-21 DJ Delorie <dj@redhat.com> - - * Makefile.in: Use CXX instead of CC to compile C++ sources. - -2002-01-17 DJ Delorie <dj@redhat.com> - - * cygcheck.cc (already_did): Avoid default constructors, which may - require exception support. - -2001-01-16 Joshua Daniel Franklin <joshuadfranklin@yahoo.com> - - * cygpath.cc (main): Add options to show Desktop and Start - Menu's Programs directory for current user or all users. - Move bulk of DPWS options outside the getopt case statement. - * utils.sgml: Update cygpath section for ADPWS options. - -2002-01-15 Joerg Schaible <joerg.schaible@gmx.de> - - * cygpath.cc (doit): Empty file ignored using option -i. - -2002-01-15 Mark Bradshaw <bradshaw@crosswalk.com> - - * mkpasswd.c (print_win_error): Add a new function. - (enum_users): Use print_win_error. - (enum_local_groups): Ditto. - (main): Ditto. - -2001-12-26 Jonathan Kamens <jik@curl.com> - - * cygpath.cc (doit): Detect and warn about an empty path. Detect and - warn about errors converting a path. - (main): Set prog_name correctly -- don't leave an extra slash or - backslash at the beginning of it. - -Fri Dec 14 14:04:37 2001 Jason Tishler <jason@tishler.net> - - * mkpasswd.c (enum_users): Change to unconditionally use - the --path-to-home option, if supplied by the user. Use default - --path-to-home option value, if appropriate. - (usage): Change usage statement to reflect new semantics. - (main): Remove defaulting of the --path-to-home option. - -Fri Dec 14 12:10:39 2001 Jason Tishler <jason@tishler.net> - - * mkpasswd.c (opts): Add indication that '-p' option requires an - argument. - -2001-12-11 Christopher Faylor <cgf@redhat.com> - - * Makefile.in: Add define to CXXFLAGS. - -2001-12-03 Christopher Faylor <cgf@redhat.com> - - * cygcheck.cc (usage): Add -c description. - * cygpath.cc (usage): Alphabetize options. - * strace.cc (usage): Ditto. - -2001-11-21 Christopher Faylor <cgf@redhat.com> - - * path.cc (cygpath): Don't consider cygdrive stuff when trying to derive - native paths. - -2001-11-20 Mark Bradshaw <bradshaw@staff.crosswalk.com> - - * mkpasswd.c: include lmerr.h - (main): New -u option to allow specifying a - specific user. If specified, groups aren't displayed and - output is limited to only the specified user. - (enum_users): If specific user is specified, via -u option, - display only that user's record. With -u use NetUserGetInfo - instead of NetUserEnum. - (load_netapi): Added netusergetinfo. - -2001-11-15 Gary R. Van Sickle <g.r.vansickle@worldnet.att.net> - - * strace.cc (main): Change getopt() to getopt_long(). - Add support for help and version info. - Use new parse_mask() function for -m/--mask option. - (longopts): Add long options structure. - (opts): Move options string from getopts call to static var. - (usage): Print usage information. - (SCCSid): Version info. - (version): New function for displaying version info. - (parse_mask): New function supporting parsing of mnemonics, - hex, and basic expressions in masks. - (mnemonic2ul): New mnemonic parsing function. - (tag_mask_mnemonic): New type. - (mnemonic_table): New table of mnemonics for mnemonic2ul() to - search through. - -2001-11-12 Corinna Vinschen <corinna@vinschen.de> - - * cygcheck.cc (dump_sysinfo): Redefine output format slightly. - Print correct build number on 9x/ME systems. - -2001-11-12 Christopher Faylor <cgf@redhat.com> - - * cygcheck.cc (main): Slight formatting tweak. - -2001-11-12 Corinna Vinschen <corinna@vinschen.de> - - * cygcheck.cc (dump_sysinfo): Add some more details. - -2001-11-12 Corinna Vinschen <corinna@vinschen.de> - - * cygcheck.cc (dump_sysinfo): Print more detailed OS information string - using OSVERSIONINFOEX information. - -2001-11-11 Christopher Faylor <cgf@redhat.com> - - * path.h: New file. - -2001-11-11 Christopher Faylor <cgf@redhat.com> - - * cygcheck.cc (scan_registry): Open registry with read-only access. - (main): Reflect argument change for dump_setup. - * dump_setup.cc (dump_setup): Add preliminary extra argument for future - use. - * path.cc (read_mounts): Open registry with read-only access. - -2001-11-11 Christopher Faylor <cgf@redhat.com> - - * cygcheck.cc (main): Display package info when '-s' is specified. - * dump_setup.cc (dump_setup): Change header. Remove typo. Always sort - packages output. - -2001-11-11 Christopher Faylor <cgf@redhat.com> - - * dump_setup.cc: New file. - * Makefile.in: Add info for dump_setup.o. - * cygcheck.cc (main): Recognize '-c' option for checking setup - installed base. - * path.cc (cygpath): Read mount table if not loaded. - -2001-11-10 Christopher Faylor <cgf@redhat.com> - - * Makefile.in (cygcheck.exe): Compile as -mno-cygwin executable. - * path.cc: New file. - * cygcheck.cc (init_paths): Use MS-DOS path syntax. - (cygwin_info): Properly display cygwin version numbers. Prettify some - output. - (dump_sysinfo): Calculate max names of posix and ms-dos paths for - prettier output. - -2001-11-09 Corinna Vinschen <corinna@vinschen.de> - - * cygcheck.cc (dump_sysinfo): Print more detailed OS information string. - -2001-11-04 Corinna Vinschen <corinna@vinschen.de> - - * getfacl.c (username): New function. - (groupname): Ditto. - (usage): Ditto. Add more user friendly help text. - (main): Add -n and --help option. Print names instead of IDs - unless -n option is given. - * setfacl.c (getperm): Tolerate whitespace and comment chars in input. - (getaclentry): Fix several input string misdetections. - (getaclentries): Allow - as input file name to read from stdin. - Tolerate whitespace and comment chars in input. - (usage): Add more user friendly help text. - (main): Add --help option. - -2001-11-04 Egor Duda <deo@logos-m.ru> - - * strace.cc (main): New option '-w'. Start traced process in separate - window. New option '-S x'. Flush buffered output every x seconds. - (create_child): Start child process in new window, when requested. - When requested, periodically flush debugging output. - -2001-10-24 Christopher Faylor <cgf@redhat.com> - - * Makefile.in: Remove EXEEXT consideration. We always need .exe - extensions. - -2001-10-20 Corinna Vinschen <corinna@vinschen.de> - - * mkgroup.c: Avoid compiler warnings. - (print_special): New function. - (main): Print special accounts by calling print_special(). - * mkpasswd.c: Avoid compiler warnings. - (enum_users): Print additional U-domain\username info in gecos - field when SIDs are printed. - (print_special): New function. - (main): Print special accounts by calling print_special(). - -2001-10-15 Christopher Faylor <cgf@redhat.com> - - * mkpasswd.cc (enum_users): Shorten "unused" passwd field. - -2001-10-13 Christopher Faylor <cgf@redhat.com> - - * Makefile.in: Allow stdinc searching for dumper. - -Tue Oct 9 21:59:00 2001 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in (MINGW_INCLUDES): Accomodate changes in Makefile.common. - -Sun Oct 7 23:06:39 2001 Christopher Faylor <cgf@cygnus.com> - - * kill.cc (main): Set exit value to 1 on invalid pid. Perform minor - cleanup. - -Fri Sep 21 20:40:30 2001 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in (mingw_getopt.o): Ensure that newlib include directories - are not searched. - -Thu Sep 20 21:00:20 2001 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in (MINGW_INCLUDES): Still need cygwin/include directory. - -Wed Sep 19 12:22:08 2001 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Filter newlib includes from mingw compilation. - -2001-09-14 Egor Duda <deo@logos-m.ru> - - * dumper.cc (dumper::dumper): Print error code in case of error. - (dumper::add_thread): Ditto. - (dumper::collect_memory_sections): Ditto. - (dumper::dump_memory_region): Ditto. - (dumper::collect_process_information): Ditto. - (print_section_name): Fix formatting. - -2001-09-13 Egor Duda <deo@logos-m.ru> - - * dumper.cc (main): Properly recognize negative pids (used by w9x). - -2001-09-09 Egor Duda <deo@logos-m.ru> - - * dumper.cc (main): Change command-line arguments format to be - similar to gdb. Allow adding error_start=x:\path\to\dumper.exe to - CYGWIN environment variable to perform core dumping in case of - program crash. - (usage): Ditto. - -Wed Sep 5 22:37:21 2001 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in (dumper): Change logic for libbfd and libintl so that - they will be found either in the build tree or the installed directory. - * mkpasswd.c (enum_users): Add a comment as a password for NT. - -2001-09-03 Michael A Chase <mchase@ix.netcom.com> - - * mount.cc (mount_commands): Don't write /cygdrive/u mount points. - -2001-09-03 Michael A Chase <mchase@ix.netcom.com> - - * mount.cc (longopts): Add mount-commands to options list. - (usage): Add mount-commands option. - (mount_commands): New function. Write commands to recreate current - mounts. - -Sat Sep 1 15:58:11 2001 Christopher Faylor <cgf@cygnus.com> - - * mount.cc (main): Eliminate excess arguments in printf. - -2001-08-30 Egor Duda <deo@logos-m.ru> - - * dumper.h: Update copyright notice. - * dumper.cc: Ditto. - * dumper.cc: (dumper::print_core_section_list): New function. - * dumper.h: (dumper::print_core_section_list): Declare it. - * dumper.cc (print_section_name): New function. - (dumper::collect_process_information): Augment debugging output. - Stop debugee processing if it posts double exception. - (usage): Fix typo in option name. - -Tue Aug 28 14:45:02 2001 Christopher Faylor <cgf@cygnus.com> - - * mount.cc (main): Issue correct warning for 'not enough arguments'. - -2001-08-14 Joerg Schaible <joerg.schaible@gmx.de> - - * cygpath.cc (main): Support -w for Windows (System) directories and - return physical correct orthography for the Windows System dir. - -2001-07-14 Chris Genly <chgenly@alum.mit.edu> - - * regtool.cc (find_key): Handle keys with only one subkey. - -Wed Jun 27 22:46:10 2001 Christopher Faylor <cgf@cygnus.com> - - * regtool.cc (find_key): Revert previous change. - -Wed Jun 27 13:37:41 2001 Keith Starsmeare" <keith_starsmeare@yahoo.co.uk> - - * regtool.cc (find_key): Allow '/' as a synonym for '\\'. - -Fri Jun 15 00:49:21 2001 Christopher Faylor <cgf@cygnus.com> - - * mkpasswd.c (main): Output passwd file in binary mode so that there - are no CRs in the file. - * umount.cc (remove_all_user_mounts): Don't try to remove /cygdrive - mounts. - -Tue May 1 10:50:48 2001 Christopher Faylor <cgf@cygnus.com> - - * mkpasswd.c (enum_users): Use /bin/bash as the default shell. - (main): Ditto. - -Sat Apr 28 22:32:01 2001 Christopher Faylor <cgf@cygnus.com> - - * passwd.cc (ttymnam): New function. - (main): Use ttynam() to report name of tty. - -2001-04-19 Egor Duda <deo@logos-m.ru> - - * dumper.cc (dumper::init_core_dump): Set architecture field in dump - header. - -Mon Apr 16 15:08:00 2001 Corinna Vinschen <vinschen@redhat.com> - - * mkgroup.c: Add function pointers `netlocalgroupgetmembers' and - `netgroupgetusers'. - (load_netapi): Load function pointers `netlocalgroupgetmembers' - and `netgroupgetusers'. - (enum_local_users): New function. - (enum_local_groups): Call `enum_local_users' for each group if - `print_users' is set. - (enum_users): New function. - (enum_groups): Call `enum_users' for each group if `print_users' is set. - (usage): Add usage text for `-u/--users'. - (longopts): Add option `--users'. - (opts): Add option character `u'. - (main): Set `print_users' according to option `-u/--users'. - Call `enum_local_groups' and `enum_groups' with additional parameter - `print_users'. - -2001-04-15 Michael A Chase <mchase@ix.netcom.com> - - * mount.cc (longopts): Add help to options list. - (opts): Add 'h' to options string. - * umount.cc (longopts): Add help to options list. - (opts): Add 'h' to options string and change 'R' to 'A'. - -2001-04-13 Kazuhiro Fujieda <fujieda@jaist.ac.jp> - - * mkgroup.c (enum_groups): Use RID + offset specified an additional - argument as ID. - (usage): Add description of -o option. - (longopts, opts): Add specifications of -o/--id-offset option. - (main): Add -o option. Invoke enum_groups with specified offset. - * mkpasswd.c (enum_users): Just like mkgroup.c. - (usage, longopts, opts): Ditto. - (main): Add -o option. Invoke enum_users with specified offset only - against domain accounts. - -2001-04-11 Egor Duda <deo@logos-m.ru> - - * mkgroup.c (uni2ansi): Use native method to convert from Unicode - to multi-byte strings. - * mkpasswd.c (uni2ansi): Ditto. - (enum_users): Pass buffer size when converting string. - (enum_local_groups): Ditto. - * mkgroup.c (enum_groups): Ditto. - (enum_local_groups): Ditto. - -Mon Apr 2 22:41:33 2001 Christopher Faylor <cgf@cygnus.com> - - * mount.cc (main): Use getopt_long for parsing arguments. - (usage): Reformat, show long and short options. - * umount.cc (main): Ditto, all of the above. - -Mon Apr 2 10:58:26 2001 Christopher Faylor <cgf@cygnus.com> - - * mount.cc (show_mounts): Change format string to more closely resemble - UNIX when displaying mount table. - -Sat Mar 17 21:46:06 2001 Christopher Faylor <cgf@cygnus.com> - - * kill.cc (forcekill): Use dwProcessId when opening a process, not the - Cygwin pid. - -Mon Mar 5 18:50:00 2001 Corinna Vinschen <vinschen@redhat.com> - - * getfacl.c: Add copyright hint. - * setfacl.c: Ditto. - * strace.cc: Ditto. - -Tue Jan 09 10:26:23 2001 Tony Sideris <tonys1110@home.com> - - * regtool.cc (cmd_list): Add new registry display options. - (cmd_list): Add code to implement -p, -k, and -l options. - - * regtool.cc (Fail): Add call to LocalFree to free memory allocated by - FormatMessage. - -Wed Jan 10 09:16:57 2001 Christopher Faylor <cgf@cygnus.com> - - * regtool.cc (translate): Ensure that 'c' is initialized. - (cmd_set): Ditto for rv. diff --git a/winsup/utils/ChangeLog-2000 b/winsup/utils/ChangeLog-2000 deleted file mode 100644 index 7ea5ae186..000000000 --- a/winsup/utils/ChangeLog-2000 +++ /dev/null @@ -1,347 +0,0 @@ -Fri Dec 15 23:41:48 2000 Christopher Faylor <cgf@cygnus.com> - - * cygcheck.cc (cygwin_info): Add some more bounds checking. - -Fri Dec 15 23:41:34 2000 Christopher Faylor <cgf@cygnus.com> - - From Matt Harget <matt@use.net>: - * utils/cygcheck.cc (keyeprint): Move declaration before other - functions so it could be used by all functions to report error - messages. Add comment. - (add_path): Check for NULL return from malloc. - (find_on_path): Check initial uses of pointers for NULL. - (rva_to_offset): Ditto. - (init_paths): Add checking for return values of Win32 calls. - (get_dword): Ditto. - (get_word): Ditto. - (dll_info): Ditto, also add NULL pointer checks. - (scan_registry): Ditto. - (check_keys): Ditto. - (dump_sysinfo): Ditto. Add default case to switch. Add error - reporting if GetVolumeInformation fails, except when it - returns ERROR_NOT_READY. - (track_down): Add checking for NULL pointers and - return values of Win32 calls. - (cygwin_info): Ditto. Correct small memory leak. - -Sun Dec 10 19:08:58 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Compile/link dumper.exe with c++. - -Tue Dec 7 11:15:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * mkpasswd.c: Slight formatting changes to the below patch. - (longopts): Fix typo in `local-groups' option. - (main): Initialize `passed_home_path' before first usage. - -Tue Dec 7 11:15:00 2000 Chris Abbey <cabbey@bresnanlink.net> - - * mkpasswd.c: make default home directory /home/$user if one - can't be found in user registry. Allow user to override - that with command line arg. - -Sun Dec 3 00:40:47 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Use CXX to build the DLL. - * configure.in: Find correct c++ compiler. - * configure: Regenerate. - -Sat Nov 18 23:53:59 2000 Christopher Faylor <cgf@cygnus.com> - - * utils.sgml: Document new options for ps and strace. - -Wed Nov 8 08:49:27 2000 Jason Tishler <jt@dothill.com> - - * mount.cc (main): Call show_cygdrive_info instead of - show_cygdrive_prefixes. - * mount.cc (show_cygdrive_prefixes): Remove function. - * mount.cc (show_cygdrive_info): New function. Actually, - show_cygdrive_info is really an enhanced version of - show_cygdrive_prefixes renamed to show_cygdrive_info that also displays - the user and system flags. - -Wed Nov 8 15:52:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * mkgroup.c (load_netapi): New function to load netapi32.dll functions - dynamically so that mkgroup works on 9x/ME as well. - Use corresponding function pointers throughout. - (usage): Change to `int'. Change text to be conformant to mkpasswd. - (main): Use `getlongopt' to process options. - Special handling to create a group entry on 9x/ME. - * mkpasswd.c (load_netapi): New function to load netapi32.dll functions - dynamically so that mkpasswd works on 9x/ME as well. - Use corresponding function pointers throughout. - (usage): Change to `int'. Change text to be conformant to mkgroup. - (main): Use `getlongopt' to process options. - Special handling to create a passwd entry on 9x/ME. - Change conditional to create an entry for the local administrators - group when appropriate. - -Thu Nov 2 2:01:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * kill.cc (main): Return 1 in case of errors. - -Sat Oct 28 01:37:55 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Accomodate newer gcc's which require linking of c++ - programs with g++. Fixup output for some compilations. - * cygcheck.cc: Respond to compiler warnings. - * dumper.cc (main): Ditto. - * parse_pe.cc (exclusion::sort_and_check): Ditto. - * setfacl.cc (getaclentry): Ditto. - -Fri Oct 27 20:20:29 2000 Christopher Faylor <cgf@cygnus.com> - - * strace.cc (main): Add a '-b' option. - -2000-10-18 DJ Delorie <dj@redhat.com> - - * ssp.c: new - * ssp.txt: new - * Makefile.in: build ssp.exe - -Wed Oct 18 18:57:46 2000 Christopher Faylor <cgf@cygnus.com> - - * ps.cc (main): Add some extra space to Windows pid output for - Windows 95. - -Tue Oct 17 23:49:04 2000 Christopher Faylor <cgf@cygnus.com> - - * ps.cc (main): Add some extra space to pid output for Windows 95. - -Tue Oct 17 1:09:00 2000 Corinna Vinschen <corinna@vinschen.de> - - Patch suggested by Brad Town <btown@ceddec.com>: - * cygcheck.cc (main): Fix argument counting. - -Sat Oct 14 23:42:58 2000 Christopher Faylor <cgf@cygnus.com> - - * ps.cc (main): Accomodate new PID_ constant. - -Thu Oct 12 02:19:12 2000 Christopher Faylor <cgf@cygnus.com> - - * strace.cc (proc_child): Handle exceptions correctly. - -Sun Oct 8 23:11:17 2000 Christopher Faylor <cgf@cygnus.com> - - * ps.cc (main): Change order of reporting slightly so that windows pids - are more obvious. - * strace.cc (add_child): Just add child's pid directly. - (remove_child): No need to close the child process pid since - ContinueDebugEvent does that automatically. - (proc_child): Ditto for child thread. - -Fri Sep 29 13:12:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * cygcheck.cc (keyeprint): New function. - (check_keys): New function. Perform checking keycodes. - (main): Add option `-k' for invoking check_keys. - Change option processing to use long options and getopt_long. - * cygkeycheck.cc: Removed. Functionality moved to `cygcheck.cc'. - * Makefile.in: Remove cygkeycheck from the dependencies. - -Wed Sep 27 16:24:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * cygkeycheck.cc: New file. Utility to retrieve keycodes. - * Makefile.in: Add cygkeycheck to the dependencies. - -2000-09-15 Joerg Schaible <joerg.schaible@gmx.de> - - * cygpath.cc: Add new options: -s and -i. - * utils.sgml: Document the new options. - -Tue Sep 12 22:45:28 2000 Christopher Faylor <cgf@cygnus.com> - - * kill.cc (main): Change behavior of -f so that it will force the - killing of a cygwin process after waiting 2 tenths of a second for it - to terminate. - (forcekill): Add an extra argument determining whether to wait for the - process to exit. - -Sun Sep 10 12:50:02 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Refine dumper.exe message. - -Mon Aug 28 21:55:56 2000 Christopher Faylor <cgf@cygnus.com> - - * kill.c (main): Avoid skipping next argument when a signal number is - specified. - * Makefile.in: Always clean dumper.exe. - -Fri Aug 25 12:41:53 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Only build dumper.exe when all of its library and - include dependencies are available. - -Fri Aug 25 11:44:29 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Make failure to build dumper.exe a non-error. - -Thu Aug 24 18:02:35 2000 Christopher Faylor <cgf@cygnus.com> - - * ps.cc (main): Always print a cygwin process using cygwin paths. - -2000-08-24 Egor Duda <deo@logos-m.ru> - - * Makefile.in: Add dumper.exe target and associated mechanisms for building it. - * dumper.cc: New file. - * dumper.h: New file. - * module_info.cc: New file. - * parse_pe.cc: New file. - -Mon Jul 31 15:12:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * passwd.c (main): Initialize oldpwd before beeing used. - -Sat Jul 29 00:44:46 2000 Christopher Faylor <cgf@cygnus.com> - - * kill.cc (main): Add '-f' option to force termination of a process. - (forcekill): New function. - * ps.cc (main): Add '-W' option to list Windows pids as well as Cygwin - pids. - (dummyprocessmodules): New function. - (GetModuleFileNameEx95): New function. - (init_win): New function. - (to_time_t): New function. - -Thu Jul 27 22:54:28 2000 Jason Tishler <jt@dothill.com> - - * utils/mount.cc (main): Add --show-cygdrive-prefixes option. - (show_cygdrive_prefixes): New function. - * utils/umount.cc (main): Add --remove-cygdrive-prefix option. - (error): Change signature from 'char *' to 'const char *'. - (remove_cygdrive_prefix): New function. - -Thu Jul 13 22:24:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * mount.cc (mount_already_exists): Slightly rearrange. - Change message texts. - -Thu Jul 13 13:02:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * mount.cc (mount_already_exists): Additional warning message - if mount point exists with another mount type. - -Sat Jul 1 00:19:27 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Find getopt.c in cygwin/lib subdirectory. - -Sat Jun 24 23:16:33 2000 Christopher Faylor <cgf@cygnus.com> - - * cygcheck.cc (cygwin_info): New function. Scans DLL for Cygwin - version info. - (dll_info): Add path parameter for checking "cygwin1.dll". - (track_down): Accomodate additional parameter for dll_info. - (ls): Ditto. - (dump_sys_info): Always print cygwin1.dll last. - -2000-06-07 Kazuhiro Fujieda <fujieda@jaist.ac.jp> - - * mount.cc (error): New function to report an error and exit. - * umount.cc (error): Ditto. - (remove_all_automounts): Check return status of cygwin_umount. - (remove_all_user_mounts): Ditto. - (remove_all_system_mounts): Ditto. - -2000-06-05 DJ Delorie <dj@cygnus.com> - - * mount.cc: add stdlib.h for exit - * umount.cc: ditto - * strace.cc: add #define for alloca - -Fri May 20 0:01:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * regtool.cc (find_key): Add parameter `access'. - Call `RegOpenKeyEx' with that desired access. - (cmd_add, cmd_remove, cmd_set, cmd_unset): Call - `find_key' with KEY_ALL_ACCESS access. - (cmd_list, cmd_check, cmd_get): Call `find_key' - with KEY_READ access. - -2000-05-19 DJ Delorie <dj@cygnus.com> - - * cygpath.cc: add --windir/--sysdir options - * utils.sgml: and document them - -Thu May 18 14:38:26 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Eliminate WINSUP_DEPS. - * cygpath.cc: Reorganize includes to accomodate sys/cygwin.h changes. - * mkgroup.c: Ditto. - * mkpasswd.c: Ditto. - * mount.cc: Ditto. Eliminate use of cygwin source specific includes. - * ps.cc: Ditto. - * cygwin.cc: Eliminate obsolete file. - -Wed Apr 26 23:43:25 2000 Christopher Faylor <cgf@cygnus.com> - - * mount.cc (main): Add "-X" option to specify a "Cygwin executable". - -Sat Apr 15 23:34:00 2000 Corinna Vinschen <corinna@vinschen.de> - - * mkpasswd.c (main): Use GetDCName instead of GetAnyDCName. - Don't create extra passwd entry for administrators group - if local_groups is set. - (usage): Change usage text slightly. - (enum_users): Loop while ERROR_MORE_DATA is returned. - (enum_local_groups): Ditto. - * mkgroup.c (enum_local_groups): Ditto. - (enum_groups) Ditto. - (usage): Change usage text slightly. - -Thu Apr 13 01:22:35 2000 Christopher Faylor <cgf@cygnus.com> - - * cygpath.cc (main): Add -a -o and -c options. - (doit): Ditto. - -Mon Apr 10 22:56:07 2000 Christopher Faylor <cgf@cygnus.com> - - * cygpath.cc (main): Add -f option for processing a group of paths from - a file. - (doit): New function. - -Sat Mar 18 22:52:37 2000 Christopher Faylor <cgf@cygnus.com> - - Patch suggested by Mumit Khan <khan@xraylith.wisc.edu>: - * strace.cc (_impure_ptr): New global variable to make strace build - under Cygwin gcc. - -Sat Mar 18 12:45:10 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Make CXXFLAGS consistent with cygwin. - -Wed Mar 15 00:53:58 2000 Christopher Faylor <cgf@cygnus.com> - - * Makefile.in: Use MINGW_CXXFLAGS when compiling strace. - -Sun Mar 12 21:22:25 2000 Christopher Faylor <cgf@cygnus.com> - - * strace.cc: Throughout, track information like start_time, etc. on a - per-process basis. - -Sun Feb 27 23:37:32 2000 Christopher Faylor <cgf@cygnus.com> - - * strace.cc (handle_output_debug_string): Parse strace output to allow - various types of time output. - -Fri Jan 21 02:10:26 Corinna Vinschen <corinna@vinschen.de> - - * utils/regtool.cc (translate): Added unix like backslash - processing. - -2000-01-20 Corinna Vinschen <corinna@vinschen.de> - - * regtool.cc: allow forward slashes as key separators - -2000-01-19 DJ Delorie <dj@redhat.com> - - * regtool.cc: New file. - * Makefile.in: add regtool - * utils.sgml: add regtool - -Sat Jan 8 17:13:51 2000 Christopher Faylor <cgf@cygnus.com> - - * getfacl.c: New file. - * setfacl.c: New file. - * Makefile.in: Add getfacl.exe and setfacl.exe to list of PROGS. - Fix link flags in MINGW case. diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in deleted file mode 100644 index 615ee97da..000000000 --- a/winsup/utils/Makefile.in +++ /dev/null @@ -1,211 +0,0 @@ -# Makefile for Cygwin utilities -# Copyright 1996, 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 -# Cygwin license. Please consult the file "CYGWIN_LICENSE" for -# details. - -SHELL:=@SHELL@ - -srcdir:=@srcdir@ -VPATH:=@srcdir@ -prefix:=@prefix@ -exec_prefix:=@exec_prefix@ - -bindir:=@bindir@ -etcdir:=$(exec_prefix)/etc -program_transform_name:=@program_transform_name@ - -INSTALL:=@INSTALL@ -INSTALL_PROGRAM:=@INSTALL_PROGRAM@ -INSTALL_DATA:=@INSTALL_DATA@ - -EXEEXT:=@EXEEXT@ -EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@ - -CC:=@CC@ -CC_FOR_TARGET:=$(CC) -CXX:=@CXX@ -CXX_FOR_TARGET:=$(CXX) - -CFLAGS:=@CFLAGS@ -CXXFLAGS:=@CXXFLAGS@ -override CXXFLAGS+=-fno-exceptions -fno-rtti -DHAVE_DECL_GETOPT=0 - -include $(srcdir)/../Makefile.common - -MINGW_INCLUDES:=$(MINGW_INCLUDES) $(w32api_include) -I$(updir) - -libbfd:=${shell $(CC) -B$(bupdir2)/bfd/ --print-file-name=libbfd.a} -libintl:=${shell $(CC) -B$(bupdir2)/intl/ --print-file-name=libintl.a} -build_dumper:=${shell test -r $(libbfd) && test -r ${libintl} && echo 1} - -DUMPER_INCLUDES:=-I$(bupdir2)/bfd -I$(updir1)/include - -MINGW_CXXFLAGS:=${filter-out $(newlib_source)/%,$(CXXFLAGS)} -mno-cygwin $(MINGW_INCLUDES) -MINGW_CFLAGS:=-mno-cygwin $(MINGW_INCLUDES) - -libcygwin:=$(cygwin_build)/libcygwin.a -libuser32:=$(w32api_lib)/libuser32.a -libkernel32:=$(w32api_lib)/libkernel32.a -ALL_DEP_LDLIBS:=$(libcygwin) $(w32api_lib)/libnetapi32.a \ - $(w32api_lib)/libadvapi32.a $(w32api_lib)/libkernel32.a \ - $(w32api_lib)/libuser32.a - -ALL_LDLIBS:=${patsubst $(w32api_lib)/lib%.a,-l%,\ - ${filter-out $(libuser32),\ - ${filter-out $(libkernel32),\ - ${filter-out $(libcygwin), $(ALL_DEP_LDLIBS)}}}} - -MINGW_LIB:=$(mingw_build)/libmingw32.a -DUMPER_LIB:=${libbfd} ${libintl} -L$(bupdir1)/libiberty -liberty -MINGW_LDLIBS:=$(ALL_LDLIBS) $(MINGW_LIB) -MINGW_DEP_LDLIBS:=${ALL_DEP_LDLIBS} ${MINGW_LIB} -ALL_LDFLAGS:=-B$(newlib_build)/libc/ -B$(newlib_build)/libm/ -B$(w32api_lib)/ \ - $(LDFLAGS) $(ALL_LDLIBS) -MINGW_LDFLAGS:=$(ALL_LDFLAGS) $(MINGW_LIB) -DUMPER_LDFLAGS:=$(ALL_LDFLAGS) $(DUMPER_LIB) - -PROGS:= cygcheck.exe cygpath.exe getfacl.exe kill.exe mkgroup.exe \ - mkpasswd.exe mount.exe passwd.exe ps.exe regtool.exe setfacl.exe \ - ssp.exe strace.exe umount.exe - -CLEAN_PROGS:=$(PROGS) -ifdef build_dumper -PROGS+=dumper$(EXEEXT) -else -PROGS:=warn_dumper $(PROGS) -CLEAN_PROGS+=dumper.exe -endif - -.SUFFIXES: -.NOEXPORT: - -.PHONY: all install clean realclean warn_dumper - -all: Makefile $(PROGS) - -strace.exe: strace.o mingw_getopt.o $(MINGW_DEP_LDLIBS) -ifdef VERBOSE - $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) -else - @echo $(CXX) -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\ - $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) -endif - -cygcheck.exe: cygcheck.o mingw_getopt.o path.o dump_setup.o $(MINGW_DEP_LDLIBS) -ifdef VERBOSE - $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,4,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) -else - @echo $(CXX) -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\ - $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,4,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) -endif - -dumper.o: dumper.cc dumper.h -ifdef VERBOSE - ${filter-out -nostdinc,$(COMPILE_CXX)} $c -o $@ $(DUMPER_INCLUDES) ${firstword $^} -else - @echo $(CXX) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\ - ${filter-out -nostdinc,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $< -endif - - -module_info.o: module_info.cc -ifdef VERBOSE - ${filter-out -nostdinc,$(COMPILE_CXX)} $c -o $@ $(DUMPER_INCLUDES) ${firstword $^} -else - @echo $(CXX) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\ - ${filter-out -nostdinc,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $< -endif - -parse_pe.o: parse_pe.cc dumper.h -ifdef VERBOSE - ${filter-out -nostdinc,$(COMPILE_CXX)} $c -o $@ $(DUMPER_INCLUDES) ${firstword $^} -else - @echo $(CXX) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\ - ${filter-out -nostdinc,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $< -endif - -mingw_getopt.o: $(cygwin_source)/lib/getopt.c -ifdef VERBOSE - ${filter-out -I$(newlib_source)/%,$(COMPILE_CC)} $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) $< -else - @echo $(CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) ... $^;\ - ${filter-out -I$(newlib_source)/%,$(COMPILE_CC)} $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) $< -endif - -path.o: path.cc -ifdef VERBOSE - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -else - @echo $(CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) ... $^;\ - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -endif - -dump_setup.o: dump_setup.cc -ifdef VERBOSE - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -else - @echo $(CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) ... $^;\ - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -endif - -cygcheck.o: cygcheck.cc -ifdef VERBOSE - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -else - @echo $(CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) ... $^;\ - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -endif - -strace.o: strace.cc -ifdef VERBOSE - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -else - @echo $(CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) ... $^;\ - ${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $< -endif - -clean: - rm -f *.o $(CLEAN_PROGS) - -realclean: clean - rm -f Makefile config.cache - -install: all - $(SHELL) $(updir1)/mkinstalldirs $(bindir) $(etcdir) - for i in $(PROGS) ; do \ - n=`echo $$i | sed '$(program_transform_name)'`; \ - $(INSTALL_PROGRAM) $$i $(bindir)/$$n; \ - done - -$(cygwin_build)/libcygwin.a: $(cygwin_build)/Makefile - @$(MAKE) -C $(@D) $(@F) - -$(mingw_build)/libmingw32.a: $(mingw_build)/Makefile - @$(MAKE) -C $(@D) $(@F) - -warn_dumper: - @echo '*** Not building dumper.exe since some required libraries are' - @echo '*** missing: libbfd.a and libintl.a.' - @echo '*** If you need this program, check out the naked-bfd and naked-intl' - @echo '*** sources from sources.redhat.com. Then, configure and build these' - @echo '*** libraries. Otherwise, you can safely ignore this warning.' - -dumper.exe: module_info.o parse_pe.o dumper.o $(ALL_DEP_LDLIBS) -ifdef VERBOSE - $(CXX) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS) -else - @echo $(CXX) -o $@ ${wordlist 1,3,$^} ${filter-out -B%, $(DUMPER_LDFLAGS)};\ - $(CXX) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS) -endif - -%.exe: %.o $(ALL_DEP_LDLIBS) -ifdef VERBOSE - $(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) -else - @echo $(CXX) -o $@ ${firstword $^} ${filter-out -B%, $(ALL_LDFLAGS)};\ - $(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) -endif diff --git a/winsup/utils/aclocal.m4 b/winsup/utils/aclocal.m4 deleted file mode 100644 index 754f640bb..000000000 --- a/winsup/utils/aclocal.m4 +++ /dev/null @@ -1,78 +0,0 @@ -dnl aclocal.m4 generated automatically by aclocal 1.3b - -dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 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. - -# Check to see if we're running under Win32, without using -# AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe". -# Otherwise set it to "". - -dnl AM_EXEEXT() -dnl This knows we add .exe if we're building in the Cygwin -dnl environment. But if we're not, then it compiles a test program -dnl to see if there is a suffix for executables. -AC_DEFUN(AM_EXEEXT, -[AC_REQUIRE([AM_CYGWIN]) -AC_REQUIRE([AM_MINGW32]) -AC_MSG_CHECKING([for executable suffix]) -AC_CACHE_VAL(am_cv_exeext, -[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then -am_cv_exeext=.exe -else -cat > am_c_test.c << 'EOF' -int main() { -/* Nothing needed here */ -} -EOF -${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 -am_cv_exeext= -for file in am_c_test.*; do - case $file in - *.c) ;; - *.o) ;; - *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; - esac -done -rm -f am_c_test*]) -test x"${am_cv_exeext}" = x && am_cv_exeext=no -fi -EXEEXT="" -test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} -AC_MSG_RESULT(${am_cv_exeext}) -AC_SUBST(EXEEXT)]) - -# Check to see if we're running under Cygwin, without using -# AC_CANONICAL_*. If so, set output variable CYGWIN to "yes". -# Otherwise set it to "no". - -dnl AM_CYGWIN() -AC_DEFUN(AM_CYGWIN, -[AC_CACHE_CHECK(for Cygwin environment, am_cv_cygwin, -[AC_TRY_COMPILE(,[return __CYGWIN32__;], -am_cv_cygwin=yes, am_cv_cygwin=no) -rm -f conftest*]) -CYGWIN= -test "$am_cv_cygwin" = yes && CYGWIN=yes]) - - - -# Check to see if we're running under Mingw, without using -# AC_CANONICAL_*. If so, set output variable MINGW32 to "yes". -# Otherwise set it to "no". - -dnl AM_MINGW32() -AC_DEFUN(AM_MINGW32, -[AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32, -[AC_TRY_COMPILE(,[return __MINGW32__;], -am_cv_mingw32=yes, am_cv_mingw32=no) -rm -f conftest*]) -MINGW32= -test "$am_cv_mingw32" = yes && MINGW32=yes]) - diff --git a/winsup/utils/configure b/winsup/utils/configure deleted file mode 100755 index 4e0fa4345..000000000 --- a/winsup/utils/configure +++ /dev/null @@ -1,1358 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -sitefile= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -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' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -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 - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # 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 ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$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" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) 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) - # 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 << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --site-file=FILE use FILE as the site file - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --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 -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$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) - 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" ;; - - -site-file | --site-file | --site-fil | --site-fi | --site-f) - ac_prev=sitefile ;; - -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) - sitefile="$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 ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - 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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# 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 - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=mount.cc - -# 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_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - 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 "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$sitefile"; then - 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 -else - CONFIG_SITE="$sitefile" -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - - - - - - -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $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 - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - - -# Do some error checking and defaulting for the host and target type. -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD NONOPT -# -# The rules are: -# 1. You are not allowed to specify --host, --target, and nonopt at the -# same time. -# 2. Host defaults to nonopt. -# 3. If nonopt is not specified, then host defaults to the current host, -# as determined by config.guess. -# 4. Target and build default to nonopt. -# 5. If nonopt is not specified, then target and build default to host. - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -case $host---$target---$nonopt in -NONE---*---* | *---NONE---* | *---*---NONE) ;; -*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; -esac - - -# Make sure we can run config.sub. -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } -fi - -echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:589: checking host system type" >&5 - -host_alias=$host -case "$host_alias" in -NONE) - case $nonopt in - NONE) - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) host_alias=$nonopt ;; - esac ;; -esac - -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$host" 1>&6 - -echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:610: checking target system type" >&5 - -target_alias=$target -case "$target_alias" in -NONE) - case $nonopt in - NONE) target_alias=$host_alias ;; - *) target_alias=$nonopt ;; - esac ;; -esac - -target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$target" 1>&6 - -echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:628: checking build system type" >&5 - -build_alias=$build -case "$build_alias" in -NONE) - case $nonopt in - NONE) build_alias=$host_alias ;; - *) build_alias=$nonopt ;; - esac ;; -esac - -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -echo "$ac_t""$build" 1>&6 - -test "$host_alias" != "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:654: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="gcc" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:684: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_prog_rejected=no - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - break - fi - done - IFS="$ac_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 $# -gt 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 - set dummy "$ac_dir/$ac_word" "$@" - shift - ac_cv_prog_CC="$@" - fi -fi -fi -fi -CC="$ac_cv_prog_CC" -if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:733: checking whether we are using GNU C" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.c <<EOF -#ifdef __GNUC__ - yes; -#endif -EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then - ac_cv_prog_gcc=yes -else - ac_cv_prog_gcc=no -fi -fi - -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 - -if test $ac_cv_prog_gcc = yes; then - GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:757: checking whether ${CC-cc} accepts -g" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - echo 'void f(){}' > conftest.c -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_cc_g=yes -else - ac_cv_prog_cc_g=no -fi -rm -f conftest* - -fi - -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - 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 $host != $build; then - ac_tool_prefix=${host_alias}- -else - ac_tool_prefix= -fi - -# Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args. -set dummy ${ac_tool_prefix}g++; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:793: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="${ac_tool_prefix}g++" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - -if test -z "$ac_cv_prog_CXX"; then -if test -n "$ac_tool_prefix"; then - # Extract the first word of "g++", so it can be a program name with args. -set dummy g++; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:825: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="g++" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CXX" && ac_cv_prog_CXX="g++" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -else - CXX="g++" -fi -fi - -if test -z "$CXX"; then - # Extract the first word of "c++", so it can be a program name with args. -set dummy c++; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:861: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_prog_CXX="c++" - break - fi - done - IFS="$ac_save_ifs" -fi -fi -CXX="$ac_cv_prog_CXX" -if test -n "$CXX"; then - echo "$ac_t""$CXX" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } -fi - -CXXFLAGS='$(CFLAGS)' - - -if test "$program_transform_name" = s,x,x,; then - program_transform_name= -else - # Double any \ or $. echo might interpret backslashes. - cat <<\EOF_SED > conftestsed -s,\\,\\\\,g; s,\$,$$,g -EOF_SED - program_transform_name="`echo $program_transform_name|sed -f conftestsed`" - rm -f conftestsed -fi -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" - -# sed with no file args requires a program. -test "$program_transform_name" = "" && program_transform_name="s,x,x," - - -if test "x$cross_compiling" = "xyes"; then - if test "x$program_transform_name" = "xs,x,x,"; then - program_transform_name="" - fi - if test "x$program_transform_name" = "x"; then - program_transform_name="s,^,$host-," - else - program_transform_name="$program_transform_name -e s,^,$host-," - 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: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# 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" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:936: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" - for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/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 - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac - done - IFS="$ac_save_IFS" - -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 "$ac_t""$INSTALL" 1>&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_PROGRAM}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - - -echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:990: checking for Cygwin environment" >&5 -if eval "test \"`echo '$''{'am_cv_cygwin'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 995 "configure" -#include "confdefs.h" - -int main() { -return __CYGWIN32__; -; return 0; } -EOF -if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - am_cv_cygwin=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - am_cv_cygwin=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$am_cv_cygwin" 1>&6 -CYGWIN= -test "$am_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:1019: checking for Mingw32 environment" >&5 -if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <<EOF -#line 1024 "configure" -#include "confdefs.h" - -int main() { -return __MINGW32__; -; return 0; } -EOF -if { (eval echo configure:1031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - am_cv_mingw32=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - am_cv_mingw32=no -fi -rm -f conftest* -rm -f conftest* -fi - -echo "$ac_t""$am_cv_mingw32" 1>&6 -MINGW32= -test "$am_cv_mingw32" = yes && MINGW32=yes - - -echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1050: checking for executable suffix" >&5 -if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$CYGWIN" = yes || test "$MINGW32" = yes; then -am_cv_exeext=.exe -else -cat > am_c_test.c << 'EOF' -int main() { -/* Nothing needed here */ -} -EOF -${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 -am_cv_exeext= -for file in am_c_test.*; do - case $file in - *.c) ;; - *.o) ;; - *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; - esac -done -rm -f am_c_test* -fi - -test x"${am_cv_exeext}" = x && am_cv_exeext=no -fi -EXEEXT="" -test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} -echo "$ac_t""${am_cv_exeext}" 1>&6 - - -trap '' 1 2 15 -cat > confcache <<\EOF -# 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. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# 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 \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -cat > conftest.defs <<\EOF -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g -s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g -s%\[%\\&%g -s%\]%\\&%g -s%\$%$$%g -EOF -DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` -rm -f conftest.defs - - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS <<EOF -#! /bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir -ac_given_INSTALL="$INSTALL" - -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS <<EOF - -# Protect against being on the right side of a sed subst in config.status. -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@host@%$host%g -s%@host_alias@%$host_alias%g -s%@host_cpu@%$host_cpu%g -s%@host_vendor@%$host_vendor%g -s%@host_os@%$host_os%g -s%@target@%$target%g -s%@target_alias@%$target_alias%g -s%@target_cpu@%$target_cpu%g -s%@target_vendor@%$target_vendor%g -s%@target_os@%$target_os%g -s%@build@%$build%g -s%@build_alias@%$build_alias%g -s%@build_cpu@%$build_cpu%g -s%@build_vendor@%$build_vendor%g -s%@build_os@%$build_os%g -s%@CC@%$CC%g -s%@CXX@%$CXX%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@EXEEXT@%$EXEEXT%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# 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_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # 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" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <<EOF - -CONFIG_FILES=\${CONFIG_FILES-"Makefile"} -EOF -cat >> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - case "$ac_given_INSTALL" in - [/$]*) INSTALL="$ac_given_INSTALL" ;; - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; - esac - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -s%@INSTALL@%$INSTALL%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -EOF -cat >> $CONFIG_STATUS <<EOF - -EOF -cat >> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - diff --git a/winsup/utils/configure.in b/winsup/utils/configure.in deleted file mode 100644 index aea20413f..000000000 --- a/winsup/utils/configure.in +++ /dev/null @@ -1,88 +0,0 @@ -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 -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 Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.12) - -AC_INIT(mount.cc) - -dnl FIXME: We temporarily define our own version of AC_PROG_CC. This is -dnl copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We -dnl are probably using a cross compiler, which will not be able to fully -dnl link an executable. This should really be fixed in autoconf -dnl itself. - -AC_DEFUN(LIB_AC_PROG_CC, -[AC_BEFORE([$0], [AC_PROG_CPP])dnl -AC_CHECK_PROG(CC, gcc, gcc) -if test -z "$CC"; then - AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) - test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) -fi - -AC_PROG_CC_GNU - -if test $ac_cv_prog_gcc = yes; then - GCC=yes -dnl Check whether -g works, even if CFLAGS is set, in case the package -dnl plays around with CFLAGS (such as to build both debugging and -dnl normal versions of a library), tasteless as that idea is. - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - AC_PROG_CC_G - 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 -]) - -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_PROG(CXX, c++, c++, , , ) - test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH]) -fi - -CXXFLAGS='$(CFLAGS)' -]) - -AC_CANONICAL_SYSTEM - -LIB_AC_PROG_CC -LIB_AC_PROG_CXX - -AC_ARG_PROGRAM - -if test "x$cross_compiling" = "xyes"; then - if test "x$program_transform_name" = "xs,x,x,"; then - program_transform_name="" - fi - if test "x$program_transform_name" = "x"; then - program_transform_name="s,^,$host-," - else - program_transform_name="$program_transform_name -e s,^,$host-," - fi -fi - -AC_PROG_INSTALL - -AM_EXEEXT - -AC_OUTPUT(Makefile) - diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc deleted file mode 100644 index f73ca860e..000000000 --- a/winsup/utils/cygcheck.cc +++ /dev/null @@ -1,1367 +0,0 @@ -/* cygcheck.cc - - 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 - Cygwin license. Please consult the file "CYGWIN_LICENSE" for - details. */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <windows.h> -#include "cygwin/include/sys/cygwin.h" -#include "cygwin/include/mntent.h" -#include "cygwin/include/getopt.h" -#include "time.h" -#include "ctype.h" - -int verbose = 0; -int registry = 0; -int sysinfo = 0; -int givehelp = 0; -int keycheck = 0; -int check_setup = 0; - -#ifdef __GNUC__ -typedef long long longlong; -#else -typedef __int64 longlong; -#endif - -void dump_setup (int, char **, bool); - -static const char version[] = "$Revision$"; - -static const char *known_env_vars[] = { - "c_include_path", - "compiler_path", - "cxx_include_path", - "cygwin", - "cygwin32", - "dejagnu", - "expect", - "gcc_default_options", - "gcc_exec_prefix", - "home", - "ld_library_path", - "library_path", - "login", - "lpath", - "make_mode", - "makeflags", - "path", - "pwd", - "strace", - "tcl_library", - "user", - 0 -}; - -struct -{ - const char *name; - int missing_is_good; -} -static common_apps[] = -{ - {"bash", 0}, - {"cat", 0}, - {"cpp", 1}, - {"find", 0}, - {"gcc", 0}, - {"gdb", 0}, - {"ld", 0}, - {"ls", 0}, - {"make", 0}, - {"sh", 0}, - {0, 0} -}; - -static int num_paths = 0, max_paths = 0; -static char **paths = 0; - -/* - * keyeprint() is used to report failure modes - */ -static int -keyeprint (const char *name) -{ - fprintf (stderr, "cygcheck: %s failed: %lu\n", name, GetLastError ()); - return 1; -} - -static void -add_path (char *s, int maxlen) -{ - if (num_paths >= max_paths) - { - max_paths += 10; - if (paths) - paths = (char **) realloc (paths, max_paths * sizeof (char *)); - else - paths = (char **) malloc (max_paths * sizeof (char *)); - } - paths[num_paths] = (char *) malloc (maxlen + 1); - if (paths[num_paths] == NULL) - { - keyeprint ("add_path: malloc()"); - return; - } - memcpy (paths[num_paths], s, maxlen); - paths[num_paths][maxlen] = 0; - char *e = paths[num_paths] + strlen (paths[num_paths]); - if (e[-1] == '\\' && e[-2] != ':') - *--e = 0; - for (int i = 1; i < num_paths; i++) - if (strcasecmp (paths[num_paths], paths[i]) == 0) - return; - num_paths++; -} - -static void -init_paths () -{ - char tmp[4000], *sl; - add_path ((char *) ".", 1); /* to be replaced later */ - add_path ((char *) ".", 1); /* the current directory */ - if (GetSystemDirectory (tmp, 4000)) - add_path (tmp, strlen (tmp)); - else - keyeprint ("init_paths: GetSystemDirectory()"); - sl = strrchr (tmp, '\\'); - if (sl) - { - strcpy (sl, "\\SYSTEM"); - add_path (tmp, strlen (tmp)); - } - GetWindowsDirectory (tmp, 4000); - add_path (tmp, strlen (tmp)); - - char *wpath = getenv ("PATH"); - if (wpath) - { - char *b, *e; - b = wpath; - while (1) - { - for (e = b; *e && *e != ';'; e++); - add_path (b, e - b); - if (!*e) - break; - b = e + 1; - } - } - else - printf ("WARNING: PATH is not set at all!\n"); -} - -static char * -find_on_path (char *file, char *default_extension, - int showall = 0, int search_sysdirs = 0) -{ - static char rv[4000]; - char tmp[4000], *ptr = rv; - - if (file == NULL) - { - keyeprint ("find_on_path: NULL pointer for file"); - return 0; - } - - if (default_extension == NULL) - { - keyeprint ("find_on_path: NULL pointer for default_extension"); - return 0; - } - - if (strchr (file, ':') || strchr (file, '\\') || strchr (file, '/')) - return file; - - if (strchr (file, '.')) - default_extension = (char *) ""; - - for (int i = 0; i < num_paths; i++) - { - if (!search_sysdirs && (i == 0 || i == 2 || i == 3)) - continue; - if (i == 0 || !search_sysdirs || strcasecmp (paths[i], paths[0])) - { - sprintf (ptr, "%s\\%s%s", paths[i], file, default_extension); - if (GetFileAttributes (ptr) != (DWORD) - 1) - { - if (showall) - printf ("Found: %s\n", ptr); - if (ptr == tmp && verbose) - printf ("Warning: %s hides %s\n", rv, ptr); - ptr = tmp; - } - } - } - - if (ptr == tmp) - return rv; - - return 0; -} - -#define DID_NEW 1 -#define DID_ACTIVE 2 -#define DID_INACTIVE 3 - -struct Did -{ - Did *next; - char *file; - int state; -}; -static Did *did = 0; - -static Did * -already_did (char *file) -{ - Did *d; - for (d = did; d; d = d->next) - if (strcasecmp (d->file, file) == 0) - return d; - d = (Did *) malloc (sizeof (Did)); - d->file = strdup (file); - d->next = did; - d->state = DID_NEW; - did = d; - return d; -} - -static int -get_word (HANDLE fh, int offset) -{ - short rv; - unsigned r; - - if (SetFilePointer (fh, offset, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER - && GetLastError () != NO_ERROR) - keyeprint ("get_word: SetFilePointer()"); - - if (!ReadFile (fh, &rv, 2, (DWORD *) & r, 0)) - keyeprint ("get_word: Readfile()"); - - return rv; -} - -static int -get_dword (HANDLE fh, int offset) -{ - int rv; - unsigned r; - - if (SetFilePointer (fh, offset, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER - && GetLastError () != NO_ERROR) - keyeprint ("get_word: SetFilePointer()"); - - if (!ReadFile (fh, &rv, 4, (DWORD *) & r, 0)) - keyeprint ("get_dword: Readfile()"); - - return rv; -} - -struct Section -{ - char name[8]; - int virtual_size; - int virtual_address; - int size_of_raw_data; - int pointer_to_raw_data; -}; - -static int -rva_to_offset (int rva, char *sections, int nsections, int *sz) -{ - int i; - - if (sections == NULL) - { - keyeprint ("rva_to_offset: NULL passed for sections"); - return 0; - } - - for (i = 0; i < nsections; i++) - { - Section *s = (Section *) (sections + i * 40); -#if 0 - printf ("%08x < %08x < %08x ? %08x\n", - s->virtual_address, rva, - s->virtual_address + s->virtual_size, s->pointer_to_raw_data); -#endif - if (rva >= s->virtual_address - && rva < s->virtual_address + s->virtual_size) - { - if (sz) - *sz = s->virtual_address + s->virtual_size - rva; - return rva - s->virtual_address + s->pointer_to_raw_data; - } - } - return 0; /* punt */ -} - -struct ExpDirectory -{ - int flags; - int timestamp; - short major_ver; - short minor_ver; - int name_rva; -}; - -struct ImpDirectory -{ - unsigned characteristics; - unsigned timestamp; - unsigned forwarder_chain; - unsigned name_rva; - unsigned iat_rva; -}; - - -static void track_down (char *file, char *suffix, int lvl); - -#define CYGPREFIX (sizeof ("%%% Cygwin ") - 1) -static void -cygwin_info (HANDLE h) -{ - char *buf, *bufend, *buf_start = NULL; - const char *hello = " Cygwin DLL version info:\n"; - DWORD size = GetFileSize (h, NULL); - DWORD n; - - if (size == 0xffffffff) - return; - - buf_start = buf = (char *) calloc (1, size + 1); - if (buf == NULL) - { - keyeprint ("cygwin_info: malloc()"); - return; - } - - (void) SetFilePointer (h, 0, NULL, FILE_BEGIN); - if (!ReadFile (h, buf, size, &n, NULL)) - { - free (buf_start); - return; - } - - static char dummy[] = "\0\0\0\0\0\0\0"; - char *dll_major = dummy; - bufend = buf + size; - while (buf < bufend) - if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL) - break; - else if (strncmp ("%%% Cygwin ", buf, CYGPREFIX) != 0) - buf++; - else - { - char *p = strchr (buf += CYGPREFIX, '\n'); - if (!p) - break; - if (strncasecmp (buf, "dll major:", 10) == 0) - { - dll_major = buf + 11; - continue; - } - char *s, pbuf[80]; - int len; - len = 1 + p - buf; - if (strncasecmp (buf, "dll minor:", 10) != 0) - s = buf; - else - { - char c = dll_major[1]; - dll_major[1] = '\0'; - int maj = atoi (dll_major); - dll_major[1] = c; - int min = atoi (dll_major + 1); - sprintf (pbuf, "DLL version: %d.%d.%.*s", maj, min, len - 11, buf + 11); - len = strlen (s = pbuf); - } - if (strncmp (s, "dll", 3) == 0) - memcpy (s, "DLL", 3); - else if (strncmp (s, "api", 3) == 0) - memcpy (s, "API", 3); - else if (islower (*s)) - *s = toupper (*s); - fprintf (stdout, "%s %.*s", hello, len, s); - hello = ""; - } - - if (!*hello) - puts (""); - - free (buf_start); - return; -} - -static void -dll_info (const char *path, HANDLE fh, int lvl, int recurse) -{ - DWORD junk; - int i; - int pe_header_offset = get_dword (fh, 0x3c); - int opthdr_ofs = pe_header_offset + 4 + 20; - unsigned short v[6]; - - if (path == NULL) - { - keyeprint ("dll_info: NULL passed for path"); - return; - } - - if (SetFilePointer (fh, opthdr_ofs + 40, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER - && GetLastError () != NO_ERROR) - keyeprint ("dll_info: SetFilePointer()"); - - if (!ReadFile (fh, &v, sizeof (v), &junk, 0)) - keyeprint ("dll_info: Readfile()"); - - if (verbose) - printf (" - os=%d.%d img=%d.%d sys=%d.%d\n", - v[0], v[1], v[2], v[3], v[4], v[5]); - else - printf ("\n"); - - int num_entries = get_dword (fh, opthdr_ofs + 92); - int export_rva = get_dword (fh, opthdr_ofs + 96); - int export_size = get_dword (fh, opthdr_ofs + 100); - int import_rva = get_dword (fh, opthdr_ofs + 104); - int import_size = get_dword (fh, opthdr_ofs + 108); - - int nsections = get_word (fh, pe_header_offset + 4 + 2); - char *sections = (char *) malloc (nsections * 40); - - if (SetFilePointer (fh, pe_header_offset + 4 + 20 + - get_word (fh, pe_header_offset + 4 + 16), 0, - FILE_BEGIN) == INVALID_SET_FILE_POINTER - && GetLastError () != NO_ERROR) - keyeprint ("dll_info: SetFilePointer()"); - - if (!ReadFile (fh, sections, nsections * 40, &junk, 0)) - keyeprint ("dll_info: Readfile()"); - - if (verbose && num_entries >= 1 && export_size > 0) - { - int expsz; - int expbase = rva_to_offset (export_rva, sections, nsections, &expsz); - - if (expbase) - { - if (SetFilePointer (fh, expbase, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER - && GetLastError () != NO_ERROR) - keyeprint ("dll_info: SetFilePointer()"); - - unsigned char *exp = (unsigned char *) malloc (expsz); - - if (!ReadFile (fh, exp, expsz, &junk, 0)) - keyeprint ("dll_info: Readfile()"); - - ExpDirectory *ed = (ExpDirectory *) exp; - int ofs = ed->name_rva - export_rva; - struct tm *tm = localtime ((const time_t *) &(ed->timestamp)); - if (tm->tm_year < 60) - tm->tm_year += 2000; - if (tm->tm_year < 200) - tm->tm_year += 1900; - printf ("%*c", lvl + 2, ' '); - printf ("\"%s\" v%d.%d ts=", exp + ofs, - ed->major_ver, ed->minor_ver); - printf ("%d/%d/%d %d:%02d\n", - tm->tm_year, tm->tm_mon + 1, tm->tm_mday, - tm->tm_hour, tm->tm_min); - } - } - - if (num_entries >= 2 && import_size > 0 && recurse) - { - int impsz; - int impbase = rva_to_offset (import_rva, sections, nsections, &impsz); - if (impbase) - { - if (SetFilePointer (fh, impbase, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER - && GetLastError () != NO_ERROR) - keyeprint ("dll_info: SetFilePointer()"); - - unsigned char *imp = (unsigned char *) malloc (impsz); - if (imp == NULL) - { - keyeprint ("dll_info: malloc()"); - return; - } - - if (!ReadFile (fh, imp, impsz, &junk, 0)) - keyeprint ("dll_info: Readfile()"); - - ImpDirectory *id = (ImpDirectory *) imp; - for (i = 0; id[i].name_rva; i++) - { - /* int ofs = id[i].name_rva - import_rva; */ - track_down ((char *) imp + id[i].name_rva - import_rva, - (char *) ".dll", lvl + 2); - } - } - } - if (strstr (path, "\\cygwin1.dll")) - cygwin_info (fh); -} - -static void -track_down (char *file, char *suffix, int lvl) -{ - if (file == NULL) - { - keyeprint ("track_down: malloc()"); - return; - } - - if (suffix == NULL) - { - keyeprint ("track_down: malloc()"); - return; - } - - char *path = find_on_path (file, suffix, 0, 1); - if (!path) - { - printf ("Error: could not find %s\n", file); - return; - } - - Did *d = already_did (file); - switch (d->state) - { - case DID_NEW: - break; - case DID_ACTIVE: - if (verbose) - { - if (lvl) - printf ("%*c", lvl, ' '); - printf ("%s", path); - printf (" (recursive)\n"); - } - return; - case DID_INACTIVE: - if (verbose) - { - if (lvl) - printf ("%*c", lvl, ' '); - printf ("%s", path); - printf (" (already done)\n"); - } - return; - default: - break; - } - - if (lvl) - printf ("%*c", lvl, ' '); - - if (!path) - { - printf ("%s not found\n", file); - return; - } - - printf ("%s", path); - - HANDLE fh = - CreateFile (path, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (fh == INVALID_HANDLE_VALUE) - { - printf (" - Cannot open\n"); - return; - } - - d->state = DID_ACTIVE; - - dll_info (path, fh, lvl, 1); - d->state = DID_INACTIVE; - if (!CloseHandle (fh)) - keyeprint ("track_down: CloseHandle()"); -} - -static void -ls (char *f) -{ - HANDLE h = CreateFile (f, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, - 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); - BY_HANDLE_FILE_INFORMATION info; - - if (!GetFileInformationByHandle (h, &info)) - keyeprint ("ls: GetFileInformationByHandle()"); - - SYSTEMTIME systime; - - if (!FileTimeToSystemTime (&info.ftLastWriteTime, &systime)) - keyeprint ("ls: FileTimeToSystemTime()"); - printf ("%5dk %04d/%02d/%02d %s", - (((int) info.nFileSizeLow) + 512) / 1024, - systime.wYear, systime.wMonth, systime.wDay, f); - dll_info (f, h, 16, 0); - if (!CloseHandle (h)) - keyeprint ("ls: CloseHandle()"); -} - -static void -cygcheck (char *app) -{ - char *papp = find_on_path (app, (char *) ".exe", 1, 0); - if (!papp) - { - printf ("Error: could not find %s\n", app); - return; - } - char *s = strdup (papp); - char *sl = 0, *t; - for (t = s; *t; t++) - if (*t == '/' || *t == '\\' || *t == ':') - sl = t; - if (sl == 0) - paths[0] = (char *) "."; - else - { - *sl = 0; - paths[0] = s; - } - did = 0; - track_down (papp, (char *) ".exe", 0); -} - - -extern char **environ; - -struct RegInfo -{ - RegInfo *prev; - char *name; - HKEY key; -}; - -static void -show_reg (RegInfo * ri, int nest) -{ - if (!ri) - return; - show_reg (ri->prev, 1); - if (nest) - printf ("%s\\", ri->name); - else - printf ("%s\n", ri->name); -} - -static void -scan_registry (RegInfo * prev, HKEY hKey, char *name, int cygnus) -{ - RegInfo ri; - ri.prev = prev; - ri.name = name; - ri.key = hKey; - - char *cp; - for (cp = name; *cp; cp++) - if (strncasecmp (cp, "cygnus", 6) == 0) - cygnus = 1; - - DWORD num_subkeys, max_subkey_len, num_values; - DWORD max_value_len, max_valdata_len, i; - if (RegQueryInfoKey (hKey, 0, 0, 0, &num_subkeys, &max_subkey_len, 0, - &num_values, &max_value_len, &max_valdata_len, 0, 0) - != ERROR_SUCCESS) - { -#if 0 - char tmp[400]; - FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, 0, GetLastError (), - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), tmp, 400, 0); - printf ("RegQueryInfoKey: %s\n", tmp); -#endif - return; - } - - if (cygnus) - { - show_reg (&ri, 0); - - char *value_name = (char *) malloc (max_value_len + 1); - if (value_name == NULL) - { - keyeprint ("scan_registry: malloc()"); - return; - } - - char *value_data = (char *) malloc (max_valdata_len + 1); - if (value_data == NULL) - { - keyeprint ("scan_registry: malloc()"); - return; - } - - for (i = 0; i < num_values; i++) - { - DWORD dlen = max_valdata_len + 1; - DWORD nlen = max_value_len + 1; - DWORD type; - RegEnumValue (hKey, i, value_name, &nlen, 0, - &type, (BYTE *) value_data, &dlen); - { - printf (" %s = ", i ? value_name : "(default)"); - switch (type) - { - case REG_DWORD: - printf ("0x%08x\n", *(unsigned *) value_data); - break; - case REG_EXPAND_SZ: - case REG_SZ: - printf ("`%s'\n", value_data); - break; - default: - printf ("(unsupported type)\n"); - break; - } - } - } - free (value_name); - free (value_data); - } - - char *subkey_name = (char *) malloc (max_subkey_len + 1); - for (i = 0; i < num_subkeys; i++) - { - if (RegEnumKey (hKey, i, subkey_name, max_subkey_len + 1) == - ERROR_SUCCESS) - { - HKEY sKey; - if (RegOpenKeyEx (hKey, subkey_name, 0, KEY_READ, &sKey) - == ERROR_SUCCESS) - { - scan_registry (&ri, sKey, subkey_name, cygnus); - if (RegCloseKey (sKey) != ERROR_SUCCESS) - keyeprint ("scan_registry: RegCloseKey()"); - } - } - } - free (subkey_name); -} - -static void -dump_sysinfo () -{ - int i, j; - char tmp[4000]; - time_t now; - char *found_cygwin_dll; - - printf ("\nCygwin Win95/NT Configuration Diagnostics\n"); - time (&now); - printf ("Current System Time: %s\n", ctime (&now)); - - OSVERSIONINFO osversion; - osversion.dwOSVersionInfoSize = sizeof (osversion); - if (!GetVersionEx (&osversion)) - keyeprint ("dump_sysinfo: GetVersionEx()"); - char *osname = (char *) "unknown OS"; - switch (osversion.dwPlatformId) - { - case VER_PLATFORM_WIN32s: - osname = (char *) "32s"; - break; - case VER_PLATFORM_WIN32_WINDOWS: - switch (osversion.dwMinorVersion) - { - case 0: - if (strchr(osversion.szCSDVersion, 'C')) - osname = (char *) "95 OSR2"; - else - osname = (char *) "95"; - break; - case 10: - if (strchr(osversion.szCSDVersion, 'A')) - osname = (char *) "98 SE"; - else - osname = (char *) "98"; - break; - case 90: - osname = (char *) "ME"; - break; - default: - osname = (char *) "9X"; - break; - } - break; - case VER_PLATFORM_WIN32_NT: - if (osversion.dwMajorVersion == 5) - { - BOOL more_info = FALSE; - OSVERSIONINFOEX osversionex; - osversionex.dwOSVersionInfoSize = sizeof (osversionex); - if (GetVersionEx ((OSVERSIONINFO *)&osversionex)) - more_info = TRUE; - if (osversion.dwMinorVersion == 0) - { - if (!more_info) - osname = (char *) "2000"; - else if (osversionex.wProductType == VER_NT_SERVER - || osversionex.wProductType == VER_NT_DOMAIN_CONTROLLER) - { - if (osversionex.wSuiteMask & VER_SUITE_DATACENTER) - osname = (char *) "2000 Datacenter Server"; - else if (osversionex.wSuiteMask & VER_SUITE_ENTERPRISE) - osname = (char *) "2000 Advanced Server"; - else - osname = (char *) "2000 Server"; - } - else - osname = (char *) "2000 Professional"; - } - else - { - if (!more_info) - osname = (char *) "XP"; - else if (osversionex.wProductType == VER_NT_SERVER - || osversionex.wProductType == VER_NT_DOMAIN_CONTROLLER) - { - if (osversionex.wSuiteMask & VER_SUITE_ENTERPRISE) - osname = (char *) ".NET Enterprise Server"; - else - osname = (char *) ".NET Server"; - } - else if (osversionex.wSuiteMask & VER_SUITE_PERSONAL) - osname = (char *) "XP Home Edition"; - else - osname = (char *) "XP Professional"; - - } - } - else - osname = (char *) "NT"; - break; - default: - osname = (char *) "??"; - break; - } - printf ("Windows %s Ver %lu.%lu Build %lu %s\n\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 : ""); - - printf ("Path:"); - char *s = getenv ("PATH"), *e; - char sep = strchr (s, ';') ? ';' : ':'; - int count_path_items = 0; - while (1) - { - for (e = s; *e && *e != sep; e++); - printf ("\t%.*s\n", e - s, s); - count_path_items++; - if (!*e) - break; - s = e + 1; - } - - if (!GetSystemDirectory (tmp, 4000)) - keyeprint ("dump_sysinfo: GetSystemDirectory()"); - printf ("\nSysDir: %s\n", tmp); - - GetWindowsDirectory (tmp, 4000); - printf ("WinDir: %s\n\n", tmp); - - - if (givehelp) - printf ("Here's some environment variables that may affect cygwin:\n"); - for (i = 0; environ[i]; i++) - { - char *eq = strchr (environ[i], '='); - if (!eq) - continue; - /* int len = eq - environ[i]; */ - for (j = 0; known_env_vars[j]; j++) - { - *eq = 0; - if (strcmp (environ[i], "PATH") == 0) - continue; /* we handle this one specially */ - if (strcasecmp (environ[i], known_env_vars[j]) == 0) - printf ("%s = `%s'\n", environ[i], eq + 1); - *eq = '='; - } - } - printf ("\n"); - - if (verbose) - { - if (givehelp) - printf ("Here's the rest of your environment variables:\n"); - for (i = 0; environ[i]; i++) - { - int found = 0; - char *eq = strchr (environ[i], '='); - if (!eq) - continue; - /* int len = eq - environ[i]; */ - for (j = 0; known_env_vars[j]; j++) - { - *eq = 0; - if (strcasecmp (environ[i], known_env_vars[j]) == 0) - found = 1; - *eq = '='; - } - if (!found) - { - *eq = 0; - printf ("%s = `%s'\n", environ[i], eq + 1); - *eq = '='; - } - } - printf ("\n"); - } - - if (registry) - { - if (givehelp) - printf ("Scanning registry for keys with `Cygnus' in them...\n"); -#if 0 - /* big and not generally useful */ - scan_registry (0, HKEY_CLASSES_ROOT, (char *) "HKEY_CLASSES_ROOT", 0); -#endif - scan_registry (0, HKEY_CURRENT_CONFIG, - (char *) "HKEY_CURRENT_CONFIG", 0); - scan_registry (0, HKEY_CURRENT_USER, (char *) "HKEY_CURRENT_USER", 0); - scan_registry (0, HKEY_LOCAL_MACHINE, (char *) "HKEY_LOCAL_MACHINE", 0); -#if 0 - /* the parts we need are duplicated in HKEY_CURRENT_USER anyway */ - scan_registry (0, HKEY_USERS, (char *) "HKEY_USERS", 0); -#endif - printf ("\n"); - } - else - printf ("Use `-r' to scan registry\n\n"); - - if (givehelp) - { - printf ("Listing available drives...\n"); - printf ("Drv Type Size Free Flags Name\n"); - } - int prev_mode = - SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); - int drivemask = GetLogicalDrives (); - - HINSTANCE k32 = LoadLibrary ("kernel32.dll"); - 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))) - continue; - char drive[4], name[200], fsname[200]; - DWORD serno = 0, maxnamelen = 0, flags = 0; - name[0] = name[0] = fsname[0] = 0; - sprintf (drive, "%c:\\", i + 'a'); - /* Report all errors, except if the Volume is ERROR_NOT_READY. - ERROR_NOT_READY is returned when removeable media drives are empty - (CD, floppy, etc.) */ - if (!GetVolumeInformation (drive, name, sizeof (name), &serno, &maxnamelen, &flags, - fsname, sizeof (fsname)) - && GetLastError () != ERROR_NOT_READY) - keyeprint ("dump_sysinfo: GetVolumeInformation()"); - - int dtype = GetDriveType (drive); - char drive_type[4] = "unk"; - switch (dtype) - { - case DRIVE_REMOVABLE: - strcpy (drive_type, "fd "); - break; - case DRIVE_FIXED: - strcpy (drive_type, "hd "); - break; - case DRIVE_REMOTE: - strcpy (drive_type, "net"); - break; - case DRIVE_CDROM: - strcpy (drive_type, "cd "); - break; - case DRIVE_RAMDISK: - strcpy (drive_type, "ram"); - break; - default: - strcpy (drive_type, "unk"); - } - - 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)) - { - capacity_mb = total_bytes / (1024L * 1024L); - percent_full = 100 - (int) ((100.0 * free_me) / total_bytes); - } - else - { - DWORD spc = 0, bps = 0, fc = 0, tc = 1; - if (GetDiskFreeSpace (drive, &spc, &bps, &fc, &tc)) - { - capacity_mb = (spc * bps * tc) / (1024 * 1024); - percent_full = 100 - (int) ((100.0 * fc) / tc); - } - } - - printf ("%.2s %s %-6s ", drive, drive_type, fsname); - if (capacity_mb >= 0) - printf ("%5dMb %3d%% ", (int) capacity_mb, (int) percent_full); - else - printf (" N/A N/A "); - printf ("%s %s %s %s %s %s %s\n", - flags & FS_CASE_IS_PRESERVED ? "CP" : " ", - flags & FS_CASE_SENSITIVE ? "CS" : " ", - flags & FS_UNICODE_STORED_ON_DISK ? "UN" : " ", - flags & FS_PERSISTENT_ACLS ? "PA" : " ", - flags & FS_FILE_COMPRESSION ? "FC" : " ", - flags & FS_VOL_IS_COMPRESSED ? "VC" : " ", -#if 0 - flags & FILE_SUPPORTS_ENCRYPTION ? "EN" : " ", - flags & FILE_SUPPORTS_OBJECT_IDS ? "OI" : " ", - flags & FILE_SUPPORTS_REPARSE_POINTS ? "RP" : " ", - flags & FILE_SUPPORTS_SPARSE_FILES ? "SP" : " ", - flags & FILE_VOLUME_QUOTAS ? "QU" : " ", -#endif - name); - } - - if (!FreeLibrary (k32)) - keyeprint ("dump_sysinfo: FreeLibrary()"); - SetErrorMode (prev_mode); - if (givehelp) - { - printf ("fd=floppy, hd=hard drive, cd=CD-ROM, net=Network Share\n"); - printf ("CP=Case Preserving, CS=Case Sensitive, UN=Unicode\n"); - printf - ("PA=Persistent ACLS, FC=File Compression, VC=Volume Compression\n"); - } - printf ("\n"); - - unsigned ml_fsname = 4, ml_dir = 7, ml_type = 6; - - struct mntent *mnt; - setmntent (0, 0); - while ((mnt = getmntent (0))) - { - unsigned n = (int) strlen (mnt->mnt_fsname); - if (ml_fsname < n) - ml_fsname = n; - n = (int) strlen (mnt->mnt_dir); - if (ml_dir < n) - ml_dir = n; - } - - if (givehelp) - { - printf - ("Mount entries: these map POSIX directories to your NT drives.\n"); - printf ("%-*s %-*s %-*s %s\n", ml_fsname, "-NT-", ml_dir, "-POSIX-", - ml_type, "-Type-", "-Flags-"); - } - - setmntent (0, 0); - while ((mnt = getmntent (0))) - { - printf ("%-*s %-*s %-*s %s\n", - ml_fsname, mnt->mnt_fsname, - ml_dir, mnt->mnt_dir, ml_type, mnt->mnt_type, mnt->mnt_opts); - } - printf ("\n"); - - add_path ((char *) "\\bin", 4); /* just in case */ - - if (givehelp) - printf - ("Looking to see where common programs can be found, if at all...\n"); - for (i = 0; common_apps[i].name; i++) - if (!find_on_path ((char *) common_apps[i].name, (char *) ".exe", 1, 0)) - { - if (common_apps[i].missing_is_good) - printf ("Not Found: %s (good!)\n", common_apps[i].name); - else - printf ("Not Found: %s\n", common_apps[i].name); - } - printf ("\n"); - - if (givehelp) - printf ("Looking for various Cygnus DLLs... (-v gives version info)\n"); - for (i = 0; i < num_paths; i++) - { - WIN32_FIND_DATA ffinfo; - sprintf (tmp, "%s/*.*", paths[i]); - HANDLE ff = FindFirstFile (tmp, &ffinfo); - int found = (ff != INVALID_HANDLE_VALUE); - found_cygwin_dll = NULL; - while (found) - { - char *f = ffinfo.cFileName; - if (strcasecmp (f + strlen (f) - 4, ".dll") == 0) - { - if (strncasecmp (f, "cyg", 3) == 0) - { - sprintf (tmp, "%s\\%s", paths[i], f); - if (strcasecmp (f, "cygwin1.dll") == 0) - found_cygwin_dll = strdup (tmp); - else - ls (tmp); - } - } - found = FindNextFile (ff, &ffinfo); - } - if (found_cygwin_dll) - { - ls (found_cygwin_dll); - free (found_cygwin_dll); - } - - FindClose (ff); - } -} - -static int -check_keys () -{ - HANDLE h = CreateFileA ("CONIN$", GENERIC_READ | GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - - if (h == INVALID_HANDLE_VALUE || h == NULL) - return (keyeprint ("check_key: Opening CONIN$")); - - DWORD mode; - - if (!GetConsoleMode (h, &mode)) - keyeprint ("check_keys: GetConsoleMode()"); - else - { - mode &= ~ENABLE_PROCESSED_INPUT; - if (!SetConsoleMode (h, mode)) - keyeprint ("check_keys: GetConsoleMode()"); - } - - fputs ("\nThis key check works only in a console window,", stderr); - fputs (" _NOT_ in a terminal session!\n", stderr); - fputs ("Abort with Ctrl+C if in a terminal session.\n\n", stderr); - fputs ("Press `q' to exit.\n", stderr); - - INPUT_RECORD in, prev_in; - - // Drop first <RETURN> key - ReadConsoleInput (h, &in, 1, &mode); - - memset (&in, 0, sizeof in); - - do - { - prev_in = in; - if (!ReadConsoleInput (h, &in, 1, &mode)) - keyeprint ("ReadConsoleInput"); - - if (!memcmp (&in, &prev_in, sizeof in)) - continue; - - switch (in.EventType) - { - case KEY_EVENT: - printf ("%s %ux VK: 0x%02x VS: 0x%02x A: 0x%02x CTRL: ", - in.Event.KeyEvent.bKeyDown ? "Pressed " : "Released", - in.Event.KeyEvent.wRepeatCount, - in.Event.KeyEvent.wVirtualKeyCode, - in.Event.KeyEvent.wVirtualScanCode, - (unsigned char) in.Event.KeyEvent.uChar.AsciiChar); - fputs (in.Event.KeyEvent.dwControlKeyState & CAPSLOCK_ON ? - "CL " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & ENHANCED_KEY ? - "EK " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & LEFT_ALT_PRESSED ? - "LA " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & LEFT_CTRL_PRESSED ? - "LC " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & NUMLOCK_ON ? - "NL " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & RIGHT_ALT_PRESSED ? - "RA " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & RIGHT_CTRL_PRESSED ? - "RC " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & SCROLLLOCK_ON ? - "SL " : "-- ", stdout); - fputs (in.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED ? - "SH " : "-- ", stdout); - fputc ('\n', stdout); - break; - - default: - break; - } - } - while (in.EventType != KEY_EVENT || - in.Event.KeyEvent.bKeyDown != FALSE || - in.Event.KeyEvent.uChar.AsciiChar != 'q'); - - CloseHandle (h); - return 0; -} - -static void -usage (FILE *stream, int status) -{ - fprintf (stream, "\ -Usage: cygcheck [OPTIONS] [program ...]\n\ - -c, --check-setup check packages installed via setup.exe\n\ - -s, --sysinfo system information (not with -k)\n\ - -v, --verbose verbose output (indented) (for -s or programs)\n\ - -r, --registry registry search (requires -s)\n\ - -k, --keycheck perform a keyboard check session (not with -s)\n\ - -h, --help give help about the info (not with -c)\n\ - -V, --version output version information and exit\n\ -You must at least give either -s or -k or a program name\n"); - exit (status); -} - -struct option longopts[] = { - {"check-setup", no_argument, NULL, 'c'}, - {"sysinfo", no_argument, NULL, 's'}, - {"registry", no_argument, NULL, 'r'}, - {"verbose", no_argument, NULL, 'v'}, - {"keycheck", no_argument, NULL, 'k'}, - {"help", no_argument, NULL, 'h'}, - {"version", no_argument, 0, 'z'}, - {0, no_argument, NULL, 0} -}; - -static char opts[] = "chkrsvV"; - -static void -print_version () -{ - const char *v = strchr (version, ':'); - int len; - if (!v) - { - v = "?"; - len = 1; - } - else - { - v += 2; - len = strchr (v, ' ') - v; - } - printf ("\ -cygcheck version %.*s\n\ -System Checker for Cygwin\n\ -Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.\n\ -Compiled on %s", len, v, __DATE__); -} - -int -main (int argc, char **argv) -{ - int i; - - while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) - switch (i) - { - case 's': - sysinfo = 1; - break; - case 'c': - check_setup = 1; - break; - case 'r': - registry = 1; - break; - case 'v': - verbose = 1; - break; - case 'k': - keycheck = 1; - break; - case 'h': - givehelp = 1; - break; - case 'V': - print_version (); - exit (0); - default: - usage (stderr, 1); - /*NOTREACHED*/} - argc -= optind; - argv += optind; - - if (argc == 0 && !sysinfo && !keycheck && !check_setup) - if (givehelp) - usage (stdout, 0); - else - usage (stderr, 1); - - if ((check_setup || sysinfo) && keycheck) - usage (stderr, 1); - - if (keycheck) - return check_keys (); - - init_paths (); - - /* FIXME: Add help for check_setup */ - if (argc >= 1 && givehelp && !check_setup) - { - if (argc == 1) - { - printf - ("Here is where the OS will find your program, and which dlls\n"); - printf ("will be used for it. Use -v to see DLL version info\n"); - } - else - { - printf - ("Here is where the OS will find your programs, and which dlls\n"); - printf ("will be used for them. Use -v to see DLL version info\n"); - } - - if (!sysinfo) - printf ("\n"); - } - - if (check_setup) - { - dump_setup (verbose, argv, true); - puts (""); - } - else - for (i = 0; i < argc; i++) - { - cygcheck (argv[i]); - puts (""); - } - - if (sysinfo) - { - dump_sysinfo (); - if (!check_setup) - { - puts (""); - dump_setup (verbose, NULL, false); - puts (""); - } - } - - if (!givehelp) - puts ("Use -h to see help about each section"); - - return 0; -} diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc deleted file mode 100644 index 81cd69ee6..000000000 --- a/winsup/utils/cygpath.cc +++ /dev/null @@ -1,498 +0,0 @@ -/* cygpath.cc -- convert pathnames between Windows and Unix format - 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 -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#define NOCOMATTRIBUTE - -#include <shlobj.h> -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <limits.h> -#include <getopt.h> -#include <windows.h> -#include <io.h> -#include <sys/fcntl.h> -#include <sys/cygwin.h> -#include <ctype.h> - -static char *prog_name; -static char *file_arg; -static char *close_arg; -static int path_flag, unix_flag, windows_flag, absolute_flag; -static int shortname_flag, ignore_flag, allusers_flag, output_flag; - -static struct option long_options[] = -{ - { (char *) "help", no_argument, NULL, 'h' }, - { (char *) "absolute", no_argument, NULL, 'a'}, - { (char *) "option", no_argument, NULL, 'o'}, - { (char *) "path", no_argument, NULL, 'p' }, - { (char *) "close", required_argument, (int *) &close_arg, 'c'}, - { (char *) "unix", no_argument, NULL, 'u' }, - { (char *) "file", required_argument, (int *) &file_arg, 'f'}, - { (char *) "version", no_argument, NULL, 'v' }, - { (char *) "windows", no_argument, NULL, 'w' }, - { (char *) "short-name", no_argument, NULL, 's' }, - { (char *) "windir", no_argument, NULL, 'W' }, - { (char *) "sysdir", no_argument, NULL, 'S' }, - { (char *) "ignore", no_argument, NULL, 'i' }, - { (char *) "allusers", no_argument, NULL, 'A' }, - { (char *) "desktop", no_argument, NULL, 'D' }, - { (char *) "smprograms", no_argument, NULL, 'P' }, - { 0, no_argument, 0, 0 } -}; - -static void -usage (FILE *stream, int status) -{ - if (!ignore_flag || !status) - fprintf (stream, "\ -Usage: %s [-p|--path] (-u|--unix)|(-w|--windows [-s|--short-name]) filename\n\ - -a|--absolute output absolute path\n\ - -c|--close handle close handle (for use in captured process)\n\ - -f|--file file read file for input path information\n\ - -i|--ignore ignore missing argument\n\ - -p|--path filename argument is a path\n\ - -s|--short-name print Windows short form of filename\n\ - -u|--unix print Unix form of filename\n\ - -v|--version output version information and exit\n\ - -w|--windows print Windows form of filename\n\ - -A|--allusers use `All Users' instead of current user for -D, -P\n\ - -D|--desktop output `Desktop' directory and exit\n\ - -P|--smprograms output Start Menu `Programs' directory and exit\n\ - -S|--sysdir output system directory and exit\n\ - -W|--windir output `Windows' directory and exit\n", - prog_name); - exit (ignore_flag ? 0 : status); -} - -static char * -get_short_paths (char *path) -{ - char *sbuf; - char *sptr; - char *next; - char *ptr = path; - char *end = strrchr (path, 0); - DWORD acc = 0; - DWORD len; - - while (ptr != NULL) - { - next = ptr; - ptr = strchr (ptr, ';'); - if (ptr) - *ptr++ = 0; - len = GetShortPathName (next, NULL, 0); - if (len == ERROR_INVALID_PARAMETER) - { - fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, next); - exit (2); - } - acc += len+1; - } - sptr = sbuf = (char *) malloc(acc+1); - if (sbuf == NULL) - { - fprintf (stderr, "%s: out of memory\n", prog_name); - exit (1); - } - ptr = path; - for(;;) - { - if (GetShortPathName (ptr, sptr, acc) == ERROR_INVALID_PARAMETER) - { - fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, ptr); - exit (2); - } - - ptr = strrchr (ptr, 0); - sptr = strrchr (sptr, 0); - if (ptr == end) - break; - *sptr = ';'; - ++ptr, ++sptr; - } - return sbuf; -} - -static char * -get_short_name (const char *filename) -{ - char *sbuf; - DWORD len = GetShortPathName (filename, NULL, 0); - if (len == ERROR_INVALID_PARAMETER) - { - fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, filename); - exit (2); - } - sbuf = (char *) malloc(++len); - if (sbuf == NULL) - { - fprintf (stderr, "%s: out of memory\n", prog_name); - exit (1); - } - if (GetShortPathName (filename, sbuf, len) == ERROR_INVALID_PARAMETER) - { - fprintf (stderr, "%s: cannot create short name of %s\n", prog_name, filename); - exit (2); - } - return sbuf; -} - -static void -doit (char *filename) -{ - char *buf; - size_t len; - int retval; - int (*conv_func)(const char *, char *); - - if (path_flag) - { - if (cygwin_posix_path_list_p (filename) - ? unix_flag - : windows_flag) - { - /* The path is already in the right format. */ - puts (filename); - exit (0); - } - } - - if (! path_flag) - { - len = strlen (filename) + 100; - if (len == 100) - { - if (!ignore_flag) - { - fprintf(stderr, "%s: can't convert empty path\n", prog_name); - exit (1); - } - else - exit (0); - } - } - else - { - if (unix_flag) - len = cygwin_win32_to_posix_path_list_buf_size (filename); - else - len = cygwin_posix_to_win32_path_list_buf_size (filename); - } - - if (len < PATH_MAX) - len = PATH_MAX; - - buf = (char *) malloc (len); - if (buf == NULL) - { - fprintf (stderr, "%s: out of memory\n", prog_name); - exit (1); - } - - if (path_flag) - { - if (unix_flag) - cygwin_win32_to_posix_path_list (filename, buf); - else - { - cygwin_posix_to_win32_path_list (filename, buf); - if (shortname_flag) - buf = get_short_paths (buf); - } - } - else - { - if (unix_flag) - conv_func = (absolute_flag ? cygwin_conv_to_full_posix_path : - cygwin_conv_to_posix_path); - else - conv_func = (absolute_flag ? cygwin_conv_to_full_win32_path : - cygwin_conv_to_win32_path); - retval = conv_func (filename, buf); - if (retval < 0) - { - fprintf (stderr, "%s: error converting \"%s\"\n", - prog_name, filename); - exit (1); - } - if (!unix_flag && shortname_flag) - buf = get_short_name (buf); - } - - puts (buf); -} - -int -main (int argc, char **argv) -{ - int c, o; - int options_from_file_flag; - char *filename; - char buf[MAX_PATH], buf2[MAX_PATH]; - WIN32_FIND_DATA w32_fd; - LPITEMIDLIST id; - - prog_name = strrchr (argv[0], '/'); - if (prog_name == NULL) - prog_name = strrchr (argv[0], '\\'); - if (prog_name == NULL) - prog_name = argv[0]; - else - prog_name++; - - path_flag = 0; - unix_flag = 0; - windows_flag = 0; - shortname_flag = 0; - ignore_flag = 0; - options_from_file_flag = 0; - allusers_flag = 0; - output_flag = 0; - while ((c = getopt_long (argc, argv, (char *) "hac:f:opsSuvwWiDPA", long_options, (int *) NULL)) - != EOF) - { - switch (c) - { - case 'a': - absolute_flag = 1; - break; - - case 'c': - CloseHandle ((HANDLE) strtoul (optarg, NULL, 16)); - break; - - case 'f': - file_arg = optarg; - break; - - case 'o': - options_from_file_flag = 1; - break; - - case 'p': - path_flag = 1; - break; - - case 'u': - if (unix_flag || windows_flag) - usage (stderr, 1); - unix_flag = 1; - break; - - case 'w': - if (unix_flag || windows_flag) - usage (stderr, 1); - windows_flag = 1; - break; - - case 's': - if (unix_flag) - usage (stderr, 1); - shortname_flag = 1; - break; - - case 'A': - allusers_flag = 1; - break; - - case 'D': - if (output_flag) - usage (stderr, 1); - output_flag = 1; - o = 'D'; - break; - - case 'P': - if (output_flag) - usage (stderr, 1); - output_flag = 1; - o = 'P'; - break; - - case 'S': - if (output_flag) - usage (stderr, 1); - output_flag = 1; - o = 'S'; - break; - - case 'W': - if (output_flag) - usage (stderr, 1); - output_flag = 1; - o = 'W'; - break; - - case 'i': - ignore_flag = 1; - break; - - case 'h': - usage (stdout, 0); - break; - - case 'v': - printf ("Cygwin path conversion version 1.2\n"); - printf ("Copyright 1998-2002 Red Hat, Inc.\n"); - exit (0); - - default: - usage (stderr, 1); - break; - } - - } - - if (output_flag) - { - switch(o) { - case 'D': - if (!allusers_flag) - SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOPDIRECTORY,&id); - else - SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_DESKTOPDIRECTORY,&id); - SHGetPathFromIDList(id, buf); - /* This if clause is a Fix for Win95 without any "All Users" */ - if ( strlen(buf) == 0 ) { - SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOPDIRECTORY,&id); - SHGetPathFromIDList(id, buf); - } - if (!windows_flag) - cygwin_conv_to_posix_path(buf, buf2); - else - strcpy(buf2, buf); - printf("%s\n", buf2); - exit(0); - - case 'P': - if (!allusers_flag) - SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &id); - else - SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_PROGRAMS, &id); - SHGetPathFromIDList(id, buf); - /* This if clause is a Fix for Win95 without any "All Users" */ - if ( strlen(buf) == 0 ) { - SHGetSpecialFolderLocation(NULL, CSIDL_PROGRAMS, &id); - SHGetPathFromIDList(id, buf); - } - if (!windows_flag) - cygwin_conv_to_posix_path(buf, buf2); - else - strcpy(buf2, buf); - printf("%s\n", buf2); - exit(0); - - case 'S': - GetSystemDirectory(buf, MAX_PATH); - FindFirstFile(buf, &w32_fd); - strcpy(strrchr(buf, '\\')+1, w32_fd.cFileName); - if (!windows_flag) - cygwin_conv_to_posix_path(buf, buf2); - else - strcpy(buf2, buf); - printf("%s\n", buf2); - exit(0); - - case 'W': - GetWindowsDirectory(buf, MAX_PATH); - if (!windows_flag) - cygwin_conv_to_posix_path(buf, buf2); - else - strcpy(buf2, buf); - printf("%s\n", buf2); - exit(0); - - default: - fprintf(stderr, "ERROR: main: switch(o)!\n"); - } - } - - if (options_from_file_flag && !file_arg) - usage (stderr, 1); - - if (! unix_flag && ! windows_flag && !options_from_file_flag) - usage (stderr, 1); - - if (!file_arg) - { - if (optind != argc - 1) - usage (stderr, 1); - - filename = argv[optind]; - doit (filename); - } - else - { - FILE *fp; - char buf[PATH_MAX * 2 + 1]; - - if (argv[optind]) - usage (stderr, 1); - - if (strcmp (file_arg, "-") != 0) - fp = fopen (file_arg, "rt"); - else - { - fp = stdin; - setmode (0, O_TEXT); - } - if (fp == NULL) - { - perror ("cygpath"); - exit (1); - } - - setbuf (stdout, NULL); - while (fgets (buf, sizeof (buf), fp) != NULL) - { - char *s = buf; - char *p = strchr (s, '\n'); - if (p) - *p = '\0'; - if (options_from_file_flag && *s == '-') - { - char c; - for (c = *++s; c && !isspace (c); c = *++s) - switch (c) - { - case 'a': - absolute_flag = 1; - break; - case 'i': - ignore_flag = 1; - break; - case 's': - shortname_flag = 1; - break; - case 'w': - unix_flag = 0; - windows_flag = 1; - break; - case 'u': - windows_flag = 0; - unix_flag = 1; - break; - case 'p': - path_flag = 1; - } - if (*s) - do - s++; - while (*s && isspace (*s)); - } - if (*s) - doit (s); - } - } - - exit (0); -} diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc deleted file mode 100644 index d551098b9..000000000 --- a/winsup/utils/dump_setup.cc +++ /dev/null @@ -1,249 +0,0 @@ -/* path.cc - - Copyright 2001 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 <windows.h> -#include <stdio.h> -#include <stdlib.h> -#include <ctype.h> -#include <stdlib.h> -#include <string.h> -#include <io.h> -#include "path.h" - -static int package_len = 20; -static int version_len = 20; - - -typedef struct -{ - char pkgtar[MAX_PATH + 1]; - char pkg[MAX_PATH + 1]; - char ver[MAX_PATH + 1]; - char tail[MAX_PATH + 1]; - char what[16]; -} fileparse; - -static int -find_tar_ext (const char *path) -{ - char *p = strchr (path, '\0') - 7; - if (p <= path) - return 0; - if (*p == '.') - { - if (strcmp (p, ".tar.gz") != 0) - return 0; - } - else if (--p <= path || strcmp (p, ".tar.bz2") != 0) - return 0; - - return p - path; -} - -static char * -base (const char *s) -{ - if (!s) - return 0; - const char *rv = s; - while (*s) - { - if ((*s == '/' || *s == ':' || *s == '\\') && s[1]) - rv = s + 1; - s++; - } - return (char *) rv; -} - -/* Parse a filename into package, version, and extension components. */ -int -parse_filename (const char *in_fn, fileparse& f) -{ - char *p, *ver; - char fn[strlen (in_fn) + 1]; - - strcpy (fn, in_fn); - int n = find_tar_ext (fn); - - if (!n) - return 0; - - strcpy (f.tail, fn + n); - fn[n] = '\0'; - f.pkg[0] = f.what[0] = '\0'; - p = base (fn); - for (ver = p; *ver; ver++) - if (*ver == '-') - if (isdigit (ver[1])) - { - *ver++ = 0; - strcpy (f.pkg, p); - break; - } - else if (strcasecmp (ver, "-src") == 0 || - strcasecmp (ver, "-patch") == 0) - { - *ver++ = 0; - strcpy (f.pkg, p); - strcpy (f.what, strlwr (ver)); - strcpy (f.pkgtar, p); - strcat (f.pkgtar, f.tail); - ver = strchr (ver, '\0'); - break; - } - - if (!f.pkg[0]) - strcpy (f.pkg, p); - - if (!f.what[0]) - { - int n; - p = strchr (ver, '\0'); - strcpy (f.pkgtar, in_fn); - if ((p -= 4) >= ver && strcasecmp (p, "-src") == 0) - n = 4; - else if ((p -= 2) >= ver && strcasecmp (p, "-patch") == 0) - n = 6; - else - n = 0; - if (n) - { - strcpy (f.what, p + 1); - *p = '\0'; - p = f.pkgtar + (p - fn) + n; - memmove (p - 4, p, strlen (p)); - } - } - - strcpy (f.ver, *ver ? ver : "0.0"); - return 1; -} - -static bool -dump_file (const char *msg, const char *fn) -{ - char *path = cygpath ("/etc/setup/", fn, NULL); - FILE *fp = fopen (path, "rt"); - bool printed; - char buf[4096]; - if (!fp) - printed = false; - else if (!fgets (buf, 4096, fp)) - printed = false; - { - char *p = strchr (buf, '\0'); - printf ("%s%s%s", msg, buf, (p == buf) || p[-1] != '\n' ? "\n" : ""); - printed = true; - } - if (fp) - fclose (fp); - return printed; -} - -struct pkgver -{ - char *name; - char *ver; -}; - -extern "C" { -int -compar (const void *a, const void *b) -{ - const pkgver *pa = (const pkgver *) a; - const pkgver *pb = (const pkgver *) b; - return strcmp (pa->name, pb->name); -} -} - -bool -match_argv (char **argv, const char *name) -{ - if (!argv || !*argv) - return true; - for (char **a = argv; *a; a++) - if (strcasecmp (*a, name) == 0) - return true; - return false; -} - -void -dump_setup (int verbose, char **argv, bool /*check_files*/) -{ - char *setup = cygpath ("/etc/setup/installed.db", NULL); - FILE *fp = fopen (setup, "rt"); - puts ("Cygwin Package Information"); - if (fp == NULL) - goto err; - if (verbose) - { - bool need_nl = dump_file ("Last downloaded files to: ", "last-cache"); - if (dump_file ("Last downloaded files from: ", "last-mirror") || need_nl) - puts (""); - } - - if (!fp) - goto err; - - int nlines; - nlines = 0; - char buf[4096]; - while (fgets (buf, 4096, fp)) - nlines += 2; /* potentially binary + source */ - if (!nlines) - goto err; - rewind (fp); - - pkgver *packages; - - packages = (pkgver *) calloc (nlines, sizeof(packages[0])); - printf ("%-*s%-*s\n", package_len, "Package", version_len, "Version"); - int n; - for (n = 0; fgets (buf, 4096, fp) && n < nlines;) - { - char *package = strtok (buf, " "); - if (!package || !*package || !match_argv (argv, package)) - continue; - for (int i = 0; i < 2; i++) - { - fileparse f; - char *tar = strtok (NULL, " "); - if (!tar || !*tar || !parse_filename (tar, f)) - break; - - int len = strlen (package); - if (f.what[0]) - len += strlen (f.what) + 1; - packages[n].name = (char *) malloc (len + 1); - strcpy (packages[n].name , package); - if (f.what[0]) - strcat (strcat (packages[n].name, "-"), f.what); - packages[n].ver = strdup (f.ver); - n++; - if (strtok (NULL, " ") == NULL) - break; - } - } - - qsort (packages, n, sizeof (packages[0]), compar); - - for (int i = 0; i < n; i++) - printf ("%-*s%-*s\n", package_len, packages[i].name, - version_len, packages[i].ver); - fclose (fp); - - return; - -err: - puts ("No setup information found"); - if (fp) - fclose (fp); - return; -} diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc deleted file mode 100644 index 50e10d255..000000000 --- a/winsup/utils/dumper.cc +++ /dev/null @@ -1,841 +0,0 @@ -/* dumper.cc - - Copyright 1999,2001 Red Hat Inc. - - Written by Egor Duda <deo@logos-m.ru> - - 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 <bfd.h> -#include <elf/common.h> -#include <elf/external.h> -#include <sys/procfs.h> -#include <sys/cygwin.h> -#include <getopt.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> -#include <windows.h> - -#include "dumper.h" - -#define NOTE_NAME_SIZE 16 - -typedef struct _note_header - { - Elf_External_Note elf_note_header; - char name[NOTE_NAME_SIZE - 1]; /* external note contains first byte of data */ - } -#ifdef __GNUC__ -__attribute__ ((packed)) -#endif - note_header; - -BOOL verbose = FALSE; - -int deb_printf (const char *format,...) -{ - if (!verbose) - return 0; - va_list va; - va_start (va, format); - int ret_val = vprintf (format, va); - va_end (va); - return ret_val; -} - -dumper::dumper (DWORD pid, DWORD tid, const char *file_name) -{ - this->file_name = strdup (file_name); - - this->pid = pid; - this->tid = tid; - core_bfd = NULL; - excl_list = new exclusion (20); - - list = last = NULL; - - status_section = NULL; - - memory_num = module_num = thread_num = 0; - - hProcess = OpenProcess (PROCESS_ALL_ACCESS, - FALSE, /* no inheritance */ - pid); - if (!hProcess) - { - fprintf (stderr, "Failed to open process #%lu, error %ld\n", pid, GetLastError ()); - return; - } - - init_core_dump (); - - if (!sane ()) - dumper_abort (); -} - -dumper::~dumper () -{ - close (); - free (file_name); -} - -void -dumper::dumper_abort () -{ - close (); - unlink (file_name); -} - -void -dumper::close () -{ - if (core_bfd) - bfd_close (core_bfd); - if (excl_list) - delete excl_list; - if (hProcess) - CloseHandle (hProcess); - core_bfd = NULL; - hProcess = NULL; - excl_list = NULL; -} - -int -dumper::sane () -{ - if (hProcess == NULL || core_bfd == NULL || excl_list == NULL) - return 0; - return 1; -} - -void -print_section_name (bfd* abfd, asection* sect, PTR obj) -{ - deb_printf (" %s", bfd_get_section_name (abfd, sect)); -} - -void -dumper::print_core_section_list () -{ - deb_printf ("current sections:"); - bfd_map_over_sections (core_bfd, &print_section_name, NULL); - deb_printf ("\n"); -} - -process_entity * -dumper::add_process_entity_to_list (process_entity_type type) -{ - if (!sane ()) - return NULL; - - process_entity *new_entity = (process_entity *) malloc (sizeof (process_entity)); - if (new_entity == NULL) - return NULL; - new_entity->next = NULL; - new_entity->section = NULL; - if (last == NULL) - list = new_entity; - else - last->next = new_entity; - last = new_entity; - return new_entity; -} - -int -dumper::add_thread (DWORD tid, HANDLE hThread) -{ - if (!sane ()) - return 0; - - CONTEXT *pcontext; - - process_entity *new_entity = add_process_entity_to_list (pr_ent_thread); - if (new_entity == NULL) - return 0; - new_entity->type = pr_ent_thread; - thread_num++; - - new_entity->u.thread.tid = tid; - new_entity->u.thread.hThread = hThread; - - pcontext = &(new_entity->u.thread.context); - pcontext->ContextFlags = CONTEXT_FULL | CONTEXT_FLOATING_POINT; - if (!GetThreadContext (hThread, pcontext)) - { - deb_printf ("Failed to read thread context (tid=%x), error %ld\n", tid, GetLastError ()); - return 0; - } - - deb_printf ("added thread %u\n", tid); - return 1; -} - -int -dumper::add_mem_region (LPBYTE base, DWORD size) -{ - if (!sane ()) - return 0; - - if (base == NULL || size == 0) - return 1; // just ignore empty regions - - process_entity *new_entity = add_process_entity_to_list (pr_ent_memory); - if (new_entity == NULL) - return 0; - new_entity->type = pr_ent_memory; - memory_num++; - - new_entity->u.memory.base = base; - new_entity->u.memory.size = size; - - deb_printf ("added memory region %08x-%08x\n", (DWORD) base, (DWORD) base + size); - return 1; -} - -/* split_add_mem_region scans list of regions to be excluded from dumping process - (excl_list) and removes all "excluded" parts from given region. */ -int -dumper::split_add_mem_region (LPBYTE base, DWORD size) -{ - if (!sane ()) - return 0; - - if (base == NULL || size == 0) - return 1; // just ignore empty regions - - LPBYTE last_base = base; - - for (process_mem_region * p = excl_list->region; - p < excl_list->region + excl_list->last; - p++) - { - if (p->base >= base + size || p->base + p->size <= base) - continue; - - if (p->base <= base) - { - last_base = p->base + p->size; - continue; - } - - add_mem_region (last_base, p->base - last_base); - last_base = p->base + p->size; - } - - if (last_base < base + size) - add_mem_region (last_base, base + size - last_base); - - return 1; -} - -int -dumper::add_module (LPVOID base_address) -{ - if (!sane ()) - return 0; - - char *module_name = psapi_get_module_name (hProcess, (DWORD) base_address); - if (module_name == NULL) - return 1; - - process_entity *new_entity = add_process_entity_to_list (pr_ent_module); - if (new_entity == NULL) - return 0; - new_entity->type = pr_ent_module; - module_num++; - - new_entity->u.module.base_address = base_address; - new_entity->u.module.name = module_name; - - parse_pe (module_name, excl_list); - - deb_printf ("added module %08x %s\n", base_address, module_name); - return 1; -} - -#define PAGE_BUFFER_SIZE 4096 - -int -dumper::collect_memory_sections () -{ - if (!sane ()) - return 0; - - LPBYTE current_page_address; - LPBYTE last_base = (LPBYTE) 0xFFFFFFFF; - DWORD last_size = 0; - DWORD done; - - char mem_buf[PAGE_BUFFER_SIZE]; - - MEMORY_BASIC_INFORMATION mbi; - - if (hProcess == NULL) - return 0; - - for (current_page_address = 0; current_page_address < (LPBYTE) 0xFFFF0000;) - { - if (!VirtualQueryEx (hProcess, current_page_address, &mbi, sizeof (mbi))) - break; - - int skip_region_p = 0; - - if (mbi.Protect & (PAGE_NOACCESS | PAGE_GUARD) || - mbi.State != MEM_COMMIT) - skip_region_p = 1; - - if (!skip_region_p) - { - /* just to make sure that later we'll be able to read it. - According to MS docs either region is all-readable or - all-nonreadable */ - if (!ReadProcessMemory (hProcess, current_page_address, mem_buf, sizeof (mem_buf), &done)) - { - DWORD err = GetLastError (); - const char *pt[10]; - pt[0] = (mbi.Protect & PAGE_READONLY) ? "RO " : ""; - pt[1] = (mbi.Protect & PAGE_READWRITE) ? "RW " : ""; - pt[2] = (mbi.Protect & PAGE_WRITECOPY) ? "WC " : ""; - pt[3] = (mbi.Protect & PAGE_EXECUTE) ? "EX " : ""; - pt[4] = (mbi.Protect & PAGE_EXECUTE_READ) ? "EXRO " : ""; - pt[5] = (mbi.Protect & PAGE_EXECUTE_READWRITE) ? "EXRW " : ""; - pt[6] = (mbi.Protect & PAGE_EXECUTE_WRITECOPY) ? "EXWC " : ""; - pt[7] = (mbi.Protect & PAGE_GUARD) ? "GRD " : ""; - pt[8] = (mbi.Protect & PAGE_NOACCESS) ? "NA " : ""; - pt[9] = (mbi.Protect & PAGE_NOCACHE) ? "NC " : ""; - char buf[10 * 6]; - buf[0] = '\0'; - for (int i = 0; i < 10; i++) - strcat (buf, pt[i]); - - deb_printf ("warning: failed to read memory at %08x-%08x (protect = %s), error %ld.\n", - (DWORD) current_page_address, - (DWORD) current_page_address + mbi.RegionSize, - buf, err); - skip_region_p = 1; - } - } - - if (!skip_region_p) - { - if (last_base + last_size == current_page_address) - last_size += mbi.RegionSize; - else - { - split_add_mem_region (last_base, last_size); - last_base = (LPBYTE) mbi.BaseAddress; - last_size = mbi.RegionSize; - } - } - else - { - split_add_mem_region (last_base, last_size); - last_base = NULL; - last_size = 0; - } - - current_page_address += mbi.RegionSize; - } - - /* dump last sections, if any */ - split_add_mem_region (last_base, last_size); - return 1; -}; - -int -dumper::dump_memory_region (asection * to, process_mem_region * memory) -{ - if (!sane ()) - return 0; - - DWORD size = memory->size; - DWORD todo; - DWORD done; - LPBYTE pos = memory->base; - DWORD sect_pos = 0; - - if (to == NULL || memory == NULL) - return 0; - - char mem_buf[PAGE_BUFFER_SIZE]; - - while (size > 0) - { - todo = min (size, PAGE_BUFFER_SIZE); - if (!ReadProcessMemory (hProcess, pos, mem_buf, todo, &done)) - { - deb_printf ("Failed to read process memory at %x(%x), error %ld\n", pos, todo, GetLastError ()); - return 0; - } - size -= done; - pos += done; - if (!bfd_set_section_contents (core_bfd, to, mem_buf, sect_pos, done)) - { - bfd_perror ("writing memory region to bfd"); - dumper_abort (); - return 0; - }; - sect_pos += done; - } - return 1; -} - -int -dumper::dump_thread (asection * to, process_thread * thread) -{ - if (!sane ()) - return 0; - - if (to == NULL || thread == NULL) - return 0; - - win32_pstatus thread_pstatus; - - note_header header; - bfd_putl32 (NOTE_NAME_SIZE, header.elf_note_header.namesz); - bfd_putl32 (sizeof (thread_pstatus), header.elf_note_header.descsz); - bfd_putl32 (NT_WIN32PSTATUS, header.elf_note_header.type); - strncpy ((char *) &header.elf_note_header.name, "win32thread", NOTE_NAME_SIZE); - - thread_pstatus.data_type = NOTE_INFO_THREAD; - thread_pstatus.data.thread_info.tid = thread->tid; - - if (tid == 0) - { - /* this is a special case. we don't know, which thread - was active when exception occured, so let's blame - the first one */ - thread_pstatus.data.thread_info.is_active_thread = TRUE; - tid = (DWORD) - 1; - } - else if (tid > 0 && thread->tid == tid) - thread_pstatus.data.thread_info.is_active_thread = TRUE; - else - thread_pstatus.data.thread_info.is_active_thread = FALSE; - - memcpy (&(thread_pstatus.data.thread_info.thread_context), - &(thread->context), - sizeof (thread->context)); - - if (!bfd_set_section_contents (core_bfd, to, &header, - 0, - sizeof (header)) || - !bfd_set_section_contents (core_bfd, to, &thread_pstatus, - sizeof (header), - sizeof (thread_pstatus))) - { - bfd_perror ("writing thread info to bfd"); - dumper_abort (); - return 0; - }; - return 1; -} - -int -dumper::dump_module (asection * to, process_module * module) -{ - if (!sane ()) - return 0; - - if (to == NULL || module == NULL) - return 0; - - struct win32_pstatus *module_pstatus_ptr; - - int note_length = sizeof (struct win32_pstatus) + strlen (module->name); - - char *buf = (char *) malloc (note_length); - - if (!buf) - { - fprintf (stderr, "Error alloating memory. Dumping aborted.\n"); - goto out; - }; - - module_pstatus_ptr = (struct win32_pstatus *) buf; - - note_header header; - bfd_putl32 (NOTE_NAME_SIZE, header.elf_note_header.namesz); - bfd_putl32 (note_length, header.elf_note_header.descsz); - bfd_putl32 (NT_WIN32PSTATUS, header.elf_note_header.type); - strncpy ((char *) &header.elf_note_header.name, "win32module", NOTE_NAME_SIZE); - - module_pstatus_ptr->data_type = NOTE_INFO_MODULE; - module_pstatus_ptr->data.module_info.base_address = module->base_address; - module_pstatus_ptr->data.module_info.module_name_size = strlen (module->name) + 1; - strcpy (module_pstatus_ptr->data.module_info.module_name, module->name); - - if (!bfd_set_section_contents (core_bfd, to, &header, - 0, - sizeof (header)) || - !bfd_set_section_contents (core_bfd, to, module_pstatus_ptr, - sizeof (header), - note_length)) - { - bfd_perror ("writing module info to bfd"); - goto out; - }; - return 1; - -out: - if (buf) - free (buf); - dumper_abort (); - return 0; - -} - -int -dumper::collect_process_information () -{ - int exception_level = 0; - - if (!sane ()) - return 0; - - if (!DebugActiveProcess (pid)) - { - fprintf (stderr, "Cannot attach to process #%lu, error %ld", pid, GetLastError ()); - return 0; - } - - char event_name[sizeof ("cygwin_error_start_event") + 20]; - sprintf (event_name, "cygwin_error_start_event%16lx", pid); - HANDLE sync_with_debugee = OpenEvent (EVENT_MODIFY_STATE, FALSE, event_name); - - DEBUG_EVENT current_event; - - while (1) - { - if (!WaitForDebugEvent (¤t_event, 20000)) - return 0; - - deb_printf ("got debug event %d\n", current_event.dwDebugEventCode); - - switch (current_event.dwDebugEventCode) - { - case CREATE_THREAD_DEBUG_EVENT: - - if (!add_thread (current_event.dwThreadId, - current_event.u.CreateThread.hThread)) - goto failed; - - break; - - case CREATE_PROCESS_DEBUG_EVENT: - - if (!add_module (current_event.u.CreateProcessInfo.lpBaseOfImage) || - !add_thread (current_event.dwThreadId, - current_event.u.CreateProcessInfo.hThread)) - goto failed; - - break; - - case EXIT_PROCESS_DEBUG_EVENT: - - deb_printf ("debugee quits"); - ContinueDebugEvent (current_event.dwProcessId, - current_event.dwThreadId, - DBG_CONTINUE); - - return 1; - - break; - - case LOAD_DLL_DEBUG_EVENT: - - if (!add_module (current_event.u.LoadDll.lpBaseOfDll)) - goto failed; - - break; - - case EXCEPTION_DEBUG_EVENT: - - exception_level++; - if (exception_level == 2) - break; - else if (exception_level > 2) - return 0; - - collect_memory_sections (); - - /* got all info. time to dump */ - - if (!prepare_core_dump ()) - { - fprintf (stderr, "Failed to prepare core dump\n"); - goto failed; - }; - - if (!write_core_dump ()) - { - fprintf (stderr, "Failed to write core dump\n"); - goto failed; - }; - - /* signal a debugee that we've finished */ - if (sync_with_debugee) - SetEvent (sync_with_debugee); - - break; - - default: - - break; - - } - - ContinueDebugEvent (current_event.dwProcessId, - current_event.dwThreadId, - DBG_CONTINUE); - } -failed: - /* set debugee free */ - if (sync_with_debugee) - SetEvent (sync_with_debugee); - - return 0; -} - -int -dumper::init_core_dump () -{ - bfd_init (); - - core_bfd = bfd_openw (file_name, "elf32-i386"); - if (core_bfd == NULL) - { - bfd_perror ("opening bfd"); - goto failed; - } - - if (!bfd_set_format (core_bfd, bfd_core)) - { - bfd_perror ("setting bfd format"); - goto failed; - } - - if (!bfd_set_arch_mach (core_bfd, bfd_arch_i386, 0)) - { - bfd_perror ("setting bfd architecture"); - goto failed; - } - - return 1; - -failed: - dumper_abort (); - return 0; - -} - -int -dumper::prepare_core_dump () -{ - if (!sane ()) - return 0; - - int sect_no = 0; - char sect_name[50]; - - flagword sect_flags; - DWORD sect_size; - bfd_vma sect_vma; - - asection *new_section; - - for (process_entity * p = list; p != NULL; p = p->next) - { - sect_no++; - - switch (p->type) - { - case pr_ent_memory: - sprintf (sect_name, ".mem/%u", sect_no); - sect_flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD; - sect_size = p->u.memory.size; - sect_vma = (bfd_vma) (p->u.memory.base); - - break; - - case pr_ent_thread: - sprintf (sect_name, ".note/%u", sect_no); - sect_flags = SEC_HAS_CONTENTS | SEC_LOAD; - sect_size = sizeof (note_header) + sizeof (struct win32_pstatus); - sect_vma = 0; - break; - - case pr_ent_module: - sprintf (sect_name, ".note/%u", sect_no); - sect_flags = SEC_HAS_CONTENTS | SEC_LOAD; - sect_size = sizeof (note_header) + sizeof (struct win32_pstatus) + - (bfd_size_type) (strlen (p->u.module.name)); - sect_vma = 0; - break; - - default: - continue; - } - - if (p->type == pr_ent_module && status_section != NULL) - { - if (!bfd_set_section_size (core_bfd, - status_section, - status_section->_raw_size + sect_size)) - { - bfd_perror ("resizing status section"); - goto failed; - }; - continue; - } - - deb_printf ("creating section (type%u) %s(%u), flags=%08x\n", - p->type, sect_name, sect_size, sect_flags); - - bfd_set_error (bfd_error_no_error); - char *buf = strdup (sect_name); - new_section = bfd_make_section (core_bfd, buf); - if (new_section == NULL) - { - if (bfd_get_error () == bfd_error_no_error) - fprintf (stderr, "error creating new section (%s), section already exists.\n", buf); - else - bfd_perror ("creating section"); - goto failed; - } - - if (!bfd_set_section_flags (core_bfd, new_section, sect_flags) || - !bfd_set_section_size (core_bfd, new_section, sect_size)) - { - bfd_perror ("setting section attributes"); - goto failed; - }; - - new_section->vma = sect_vma; - new_section->output_section = new_section; - new_section->output_offset = 0; - p->section = new_section; - } - - return 1; - -failed: - dumper_abort (); - return 0; -} - -int -dumper::write_core_dump () -{ - if (!sane ()) - return 0; - - for (process_entity * p = list; p != NULL; p = p->next) - { - if (p->section == NULL) - continue; - - deb_printf ("writing section type=%u base=%08x size=%08x flags=%08x\n", - p->type, - p->section->vma, - p->section->_raw_size, - p->section->flags); - - switch (p->type) - { - case pr_ent_memory: - dump_memory_region (p->section, &(p->u.memory)); - break; - - case pr_ent_thread: - dump_thread (p->section, &(p->u.thread)); - break; - - case pr_ent_module: - dump_module (p->section, &(p->u.module)); - break; - - default: - continue; - - } - } - return 1; -} - -static void -usage () -{ - fprintf (stderr, "Usage: dumper [options] filename pid\n"); - fprintf (stderr, "filename -- dump core to filename.core\n"); - fprintf (stderr, "pid -- win32-pid of process to dump\n\n"); - fprintf (stderr, "Possible options are:\n"); - fprintf (stderr, "-d -- be verbose while dumping\n"); - fprintf (stderr, "-q -- be quite while dumping (default)\n"); -} - -int -main (int argc, char **argv) -{ - int opt; - const char *p = ""; - DWORD pid; - char win32_name [MAX_PATH]; - - while ((opt = getopt (argc, argv, "dq")) != EOF) - switch (opt) - { - case 'd': - verbose = TRUE; - break; - case 'q': - verbose = FALSE; - break; - default: - usage (); - break; - } - - if (argv && *(argv + optind) && *(argv + optind +1)) - { - *win32_name = '\0'; - cygwin_conv_to_win32_path (*(argv + optind), win32_name); - if ((p = strrchr (win32_name, '\\'))) - p++; - else - p = win32_name; - pid = strtoul (*(argv + optind + 1), NULL, 10); - } - else - { - usage (); - return -1; - } - - char *core_file = (char *) malloc (strlen (p) + sizeof (".core")); - if (!core_file) - { - fprintf (stderr, "error allocating memory\n"); - return -1; - } - sprintf (core_file, "%s.core", p); - - DWORD tid = 0; - - if (verbose) - printf ("dumping process #%lu to %s\n", pid, core_file); - - dumper d (pid, tid, core_file); - if (!d.sane ()) - return -1; - d.collect_process_information (); - free (core_file); - - return 0; -}; diff --git a/winsup/utils/dumper.h b/winsup/utils/dumper.h deleted file mode 100644 index 2a1841e78..000000000 --- a/winsup/utils/dumper.h +++ /dev/null @@ -1,132 +0,0 @@ -/* dumper.h - - Copyright 1999,2001 Red Hat Inc. - - Written by Egor Duda <deo@logos-m.ru> - -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 _DUMPER_H_ -#define _DUMPER_H_ - -#include <windows.h> - -typedef struct -{ - LPBYTE base; - DWORD size; -} process_mem_region; - -typedef struct -{ - DWORD tid; - HANDLE hThread; - CONTEXT context; -} process_thread; - -typedef struct -{ - LPVOID base_address; - char* name; -} process_module; - -enum process_entity_type -{ - pr_ent_memory, - pr_ent_thread, - pr_ent_module -}; - -typedef struct _process_entity -{ - process_entity_type type; - union - { - process_thread thread; - process_mem_region memory; - process_module module; - } u; - asection* section; - struct _process_entity* next; -} process_entity; - -class exclusion -{ -public: - int last; - int size; - int step; - process_mem_region* region; - - exclusion ( int step ) { last = size = 0; - this->step = step; - region = NULL; } - ~exclusion () { free ( region ); } - int add ( LPBYTE mem_base, DWORD mem_size ); - int sort_and_check (); -}; - -#define PAGE_BUFFER_SIZE 4096 - -class dumper -{ - DWORD pid; - DWORD tid; /* thread id of active thread */ - HANDLE hProcess; - process_entity* list; - process_entity* last; - exclusion* excl_list; - - char* file_name; - bfd* core_bfd; - - asection* status_section; - - int memory_num; - int module_num; - int thread_num; - - void close (); - void dumper_abort (); - - process_entity* add_process_entity_to_list ( process_entity_type type ); - int add_thread ( DWORD tid, HANDLE hThread ); - int add_mem_region ( LPBYTE base, DWORD size ); - - /* break mem_region by excl_list and add add all subregions */ - int split_add_mem_region ( LPBYTE base, DWORD size ); - - int add_module ( LPVOID base_address ); - - int collect_memory_sections (); - int dump_memory_region ( asection* to, process_mem_region* memory ); - int dump_thread ( asection* to, process_thread* thread ); - int dump_module ( asection* to, process_module* module ); - -public: - int sane (); - - int collect_process_information (); - void print_core_section_list (); - - dumper ( DWORD pid, DWORD tid, const char* name ); - ~dumper (); - - int init_core_dump (); - int prepare_core_dump (); - int write_core_dump (); -}; - -extern int deb_printf ( const char* format, ... ); - -extern char* psapi_get_module_name ( HANDLE hProcess, DWORD BaseAddress ); - -extern int parse_pe ( const char* file_name, exclusion* excl_list ); - -extern BOOL verbose; - -#endif diff --git a/winsup/utils/getfacl.c b/winsup/utils/getfacl.c deleted file mode 100644 index b6eb94020..000000000 --- a/winsup/utils/getfacl.c +++ /dev/null @@ -1,221 +0,0 @@ -/* getfacl.c - - Copyright 2000, 2001 Red Hat Inc. - - Written by Corinna Vinschen <vinschen@redhat.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. */ - -#include <pwd.h> -#include <grp.h> -#include <stdio.h> -#include <unistd.h> -#include <getopt.h> -#include <sys/types.h> -#include <sys/acl.h> -#include <sys/stat.h> -#include <string.h> - -char * -permstr (mode_t perm) -{ - static char pbuf[4]; - - pbuf[0] = (perm & S_IREAD) ? 'r' : '-'; - pbuf[1] = (perm & S_IWRITE) ? 'w' : '-'; - pbuf[2] = (perm & S_IEXEC) ? 'x' : '-'; - pbuf[3] = '\0'; - return pbuf; -} - -const char * -username (uid_t uid) -{ - static char ubuf[256]; - struct passwd *pw; - - if ((pw = getpwuid (uid))) - strcpy (ubuf, pw->pw_name); - else - sprintf (ubuf, "%d <unknown>", uid); - return ubuf; -} - -const char * -groupname (gid_t gid) -{ - static char gbuf[256]; - struct group *gr; - - if ((gr = getgrgid (gid))) - strcpy (gbuf, gr->gr_name); - else - sprintf (gbuf, "%d <unknown>", gid); - return gbuf; -} - -#define pn(txt) fprintf (fp, txt "\n", name) -#define p(txt) fprintf (fp, txt "\n") - -int -usage (const char *name, int help) -{ - FILE *fp = help ? stdout : stderr; - - pn ("usage: %s [-adn] file..."); - if (!help) - pn ("Try `%s --help' for more information."); - else - { - p (""); - p ("Display file and directory access control lists (ACLs)."); - p (""); - p ("For each argument that is a regular file, special file or"); - p ("directory, getfacl displays the owner, the group, and the ACL."); - p ("For directories getfacl displays additionally the default ACL."); - p (""); - p ("With no options specified, getfacl displays the filename, the"); - p ("owner, the group, and both the ACL and the default ACL, if it"); - p ("exists."); - p (""); - p ("The following options are supported:"); - p (""); - p ("-a Display the filename, the owner, the group, and the ACL"); - p (" of the file."); - p (""); - p ("-d Display the filename, the owner, the group, and the default"); - p (" ACL of the directory, if it exists."); - p (""); - p ("-n Display user and group IDs instead of names."); - p (""); - p ("The format for ACL output is as follows:"); - p (" # file: filename"); - p (" # owner: name or uid"); - p (" # group: name or uid"); - p (" user::perm"); - p (" user:name or uid:perm"); - p (" group::perm"); - p (" group:name or gid:perm"); - p (" mask:perm"); - p (" other:perm"); - p (" default:user::perm"); - p (" default:user:name or uid:perm"); - p (" default:group::perm"); - p (" default:group:name or gid:perm"); - p (" default:mask:perm"); - p (" default:other:perm"); - p (""); - p ("When multiple files are specified on the command line, a blank"); - p ("line separates the ACLs for each file."); - } - return 1; -} - -struct option longopts[] = { - {"help", no_argument, NULL, 'h'}, - {0, no_argument, NULL, 0} -}; - -int -main (int argc, char **argv) -{ - extern int optind; - int c, i; - int aopt = 0; - int dopt = 0; - int nopt = 0; - int first = 1; - struct stat st; - aclent_t acls[MAX_ACL_ENTRIES]; - - while ((c = getopt_long (argc, argv, "adn", longopts, NULL)) != EOF) - switch (c) - { - case 'a': - aopt = 1; - break; - case 'd': - dopt = 1; - break; - case 'n': - nopt = 1; - break; - case 'h': - return usage (argv[0], 1); - default: - return usage (argv[0], 0); - } - if (optind > argc - 1) - return usage (argv[0], 0); - while ((c = optind++) < argc) - { - if (stat (argv[c], &st)) - { - perror (argv[0]); - continue; - } - if (!first) - putchar ('\n'); - first = 0; - printf ("# file: %s\n", argv[c]); - if (nopt) - { - printf ("# owner: %d\n", st.st_uid); - printf ("# group: %d\n", st.st_gid); - } - else - { - printf ("# owner: %s\n", username (st.st_uid)); - printf ("# group: %s\n", groupname (st.st_gid)); - } - if ((c = acl (argv[c], GETACL, MAX_ACL_ENTRIES, acls)) < 0) - { - perror (argv[0]); - continue; - } - for (i = 0; i < c; ++i) - { - if (acls[i].a_type & ACL_DEFAULT) - { - if (aopt) - continue; - printf ("default:"); - } - else if (dopt) - continue; - switch (acls[i].a_type & ~ACL_DEFAULT) - { - case USER_OBJ: - printf ("user::"); - break; - case USER: - if (nopt) - printf ("user:%d:", acls[i].a_id); - else - printf ("user:%s:", username (acls[i].a_id)); - break; - case GROUP_OBJ: - printf ("group::"); - break; - case GROUP: - if (nopt) - printf ("group:%d:", acls[i].a_id); - else - printf ("group:%s:", groupname (acls[i].a_id)); - break; - case CLASS_OBJ: - printf ("mask::"); - break; - case OTHER_OBJ: - printf ("other::"); - break; - } - printf ("%s\n", permstr (acls[i].a_perm)); - } - } - return 0; -} diff --git a/winsup/utils/kill.cc b/winsup/utils/kill.cc deleted file mode 100644 index 626b07156..000000000 --- a/winsup/utils/kill.cc +++ /dev/null @@ -1,122 +0,0 @@ -/* kill.cc - - Copyright 1996, 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 -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#include <stdio.h> -#include <stdlib.h> -#include <signal.h> -#include <string.h> -#include <time.h> -#include <errno.h> -#include <windows.h> -#include <sys/cygwin.h> - -static void usage (void); -static int __stdcall getsig (char *); -static void __stdcall forcekill (int, int, int); - -int -main (int argc, char **argv) -{ - int sig = SIGTERM; - int force = 0; - int gotsig = 0; - int ret = 0; - - if (argc == 1) - usage (); - - while (*++argv && **argv == '-') - if (strcmp (*argv + 1, "f") == 0) - force = 1; - else if (gotsig) - break; - else if (strcmp(*argv + 1, "0") != 0) - { - sig = getsig (*argv + 1); - gotsig = 1; - } - else - { - argv++; - sig = 0; - goto sig0; - } - - if (sig <= 0 || sig > NSIG) - { - fprintf (stderr, "kill: unknown signal: %s\n", argv[-1]); - exit (1); - } - -sig0: - while (*argv != NULL) - { - char *p; - int pid = strtol (*argv, &p, 10); - if (*p != '\0') - { - fprintf (stderr, "kill: illegal pid: %s\n", *argv); - ret = 1; - } - else if (kill (pid, sig) == 0) - { - if (force) - forcekill (pid, sig, 1); - } - else if (force && sig != 0) - forcekill (pid, sig, 0); - else - { - char buf[1000]; - sprintf (buf, "kill %d", pid); - perror (buf); - ret = 1; - } - argv++; - } - return ret; -} - -static void -usage (void) -{ - fprintf (stderr, "Usage: kill [-sigN] pid1 [pid2 ...]\n"); - exit (1); -} - -static int -getsig (char *in_sig) -{ - char *sig; - char buf[80]; - - if (strncmp (in_sig, "SIG", 3) == 0) - sig = in_sig; - else - { - sprintf (buf, "SIG%s", in_sig); - sig = buf; - } - return (strtosigno (sig) ?: atoi (in_sig)); -} - -static void __stdcall -forcekill (int pid, int sig, int wait) -{ - external_pinfo *p = (external_pinfo *) cygwin_internal (CW_GETPINFO_FULL, pid); - if (!p) - return; - HANDLE h = OpenProcess (PROCESS_TERMINATE, FALSE, (DWORD) p->dwProcessId); - if (!h) - return; - if (!wait || WaitForSingleObject (h, 200) != WAIT_OBJECT_0) - TerminateProcess (h, sig << 8); - CloseHandle (h); -} diff --git a/winsup/utils/mkgroup.c b/winsup/utils/mkgroup.c deleted file mode 100644 index 9644b1842..000000000 --- a/winsup/utils/mkgroup.c +++ /dev/null @@ -1,573 +0,0 @@ -/* mkgroup.c: - - Copyright 1997, 1998 Cygnus Solutions. - - 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 <ctype.h> -#include <stdlib.h> -#include <wchar.h> -#include <stdio.h> -#include <windows.h> -#include <sys/cygwin.h> -#include <getopt.h> -#include <lmaccess.h> -#include <lmapibuf.h> - -SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY}; -SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY}; - -NET_API_STATUS WINAPI (*netapibufferfree)(PVOID); -NET_API_STATUS WINAPI (*netgroupenum)(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); -NET_API_STATUS WINAPI (*netlocalgroupenum)(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); -NET_API_STATUS WINAPI (*netlocalgroupgetmembers)(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); -NET_API_STATUS WINAPI (*netgetdcname)(LPWSTR,LPWSTR,PBYTE*); -NET_API_STATUS WINAPI (*netgroupgetusers)(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); - -#ifndef min -#define min(a,b) (((a)<(b))?(a):(b)) -#endif - -BOOL -load_netapi () -{ - HANDLE h = LoadLibrary ("netapi32.dll"); - - if (!h) - return FALSE; - - if (!(netapibufferfree = (void *) GetProcAddress (h, "NetApiBufferFree"))) - return FALSE; - if (!(netgroupenum = (void *) GetProcAddress (h, "NetGroupEnum"))) - return FALSE; - if (!(netgroupgetusers = (void *) GetProcAddress (h, "NetGroupGetUsers"))) - return FALSE; - if (!(netlocalgroupenum = (void *) GetProcAddress (h, "NetLocalGroupEnum"))) - return FALSE; - if (!(netlocalgroupgetmembers = (void *) GetProcAddress (h, "NetLocalGroupGetMembers"))) - return FALSE; - if (!(netgetdcname = (void *) GetProcAddress (h, "NetGetDCName"))) - return FALSE; - - return TRUE; -} - -char * -put_sid (PSID sid) -{ - static char s[512]; - char t[32]; - DWORD i; - - strcpy (s, "S-1-"); - sprintf(t, "%u", GetSidIdentifierAuthority (sid)->Value[5]); - strcat (s, t); - for (i = 0; i < *GetSidSubAuthorityCount (sid); ++i) - { - sprintf(t, "-%lu", *GetSidSubAuthority (sid, i)); - strcat (s, t); - } - return s; -} - -void -psx_dir (char *in, char *out) -{ - if (isalpha (in[0]) && in[1] == ':') - { - sprintf (out, "/cygdrive/%c", in[0]); - in += 2; - out += strlen (out); - } - - while (*in) - { - if (*in == '\\') - *out = '/'; - else - *out = *in; - in++; - out++; - } - - *out = '\0'; -} - -void -uni2ansi (LPWSTR wcs, char *mbs, int size) -{ - if (wcs) - WideCharToMultiByte (CP_ACP, 0, wcs, -1, mbs, size, NULL, NULL); - else - *mbs = '\0'; -} - -void -enum_local_users (LPWSTR groupname) -{ - LOCALGROUP_MEMBERS_INFO_1 *buf1; - DWORD entries = 0; - DWORD total = 0; - DWORD reshdl = 0; - - if (!netlocalgroupgetmembers (NULL, groupname, - 1, (LPBYTE *) &buf1, - MAX_PREFERRED_LENGTH, - &entries, &total, &reshdl)) - { - int i, first = 1; - - for (i = 0; i < entries; ++i) - if (buf1[i].lgrmi1_sidusage == SidTypeUser) - { - char user[256]; - - if (!first) - printf (","); - first = 0; - uni2ansi (buf1[i].lgrmi1_name, user, sizeof (user)); - printf ("%s", user); - } - netapibufferfree (buf1); - } -} - -int -enum_local_groups (int print_sids, int print_users) -{ - LOCALGROUP_INFO_0 *buffer; - DWORD entriesread = 0; - DWORD totalentries = 0; - DWORD resume_handle = 0; - DWORD rc; - - do - { - DWORD i; - - rc = netlocalgroupenum (NULL, 0, (LPBYTE *) &buffer, 1024, - &entriesread, &totalentries, &resume_handle); - switch (rc) - { - case ERROR_ACCESS_DENIED: - fprintf (stderr, "Access denied\n"); - exit (1); - - case ERROR_MORE_DATA: - case ERROR_SUCCESS: - break; - - default: - fprintf (stderr, "NetLocalGroupEnum() failed with %ld\n", rc); - exit (1); - } - - for (i = 0; i < entriesread; i++) - { - char localgroup_name[100]; - char domain_name[100]; - DWORD domname_len = 100; - char psid_buffer[1024]; - PSID psid = (PSID) psid_buffer; - DWORD sid_length = 1024; - DWORD gid; - SID_NAME_USE acc_type; - uni2ansi (buffer[i].lgrpi0_name, localgroup_name, sizeof (localgroup_name)); - - if (!LookupAccountName (NULL, localgroup_name, psid, - &sid_length, domain_name, &domname_len, - &acc_type)) - { - fprintf (stderr, "LookupAccountName(%s) failed with %ld\n", - localgroup_name, GetLastError ()); - continue; - } - else if (acc_type == SidTypeDomain) - { - char domname[356]; - - strcpy (domname, domain_name); - strcat (domname, "\\"); - strcat (domname, localgroup_name); - sid_length = 1024; - domname_len = 100; - if (!LookupAccountName (NULL, domname, - psid, &sid_length, - domain_name, &domname_len, - &acc_type)) - { - fprintf (stderr, - "LookupAccountName(%s) failed with error %ld\n", - localgroup_name, GetLastError ()); - continue; - } - } - - gid = *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1); - - printf ("%s:%s:%ld:", localgroup_name, - print_sids ? put_sid (psid) : "", - gid); - if (print_users) - enum_local_users (buffer[i].lgrpi0_name); - printf ("\n"); - } - - netapibufferfree (buffer); - - } - while (rc == ERROR_MORE_DATA); - - return 0; -} - -void -enum_users (LPWSTR servername, LPWSTR groupname) -{ - GROUP_USERS_INFO_0 *buf1; - DWORD entries = 0; - DWORD total = 0; - DWORD reshdl = 0; - - if (!netgroupgetusers (servername, groupname, - 0, (LPBYTE *) &buf1, - MAX_PREFERRED_LENGTH, - &entries, &total, &reshdl)) - { - int i, first = 1; - - for (i = 0; i < entries; ++i) - { - char user[256]; - - if (!first) - printf (","); - first = 0; - uni2ansi (buf1[i].grui0_name, user, sizeof (user)); - printf ("%s", user); - } - netapibufferfree (buf1); - } -} - -void -enum_groups (LPWSTR servername, int print_sids, int print_users, int id_offset) -{ - GROUP_INFO_2 *buffer; - DWORD entriesread = 0; - DWORD totalentries = 0; - DWORD resume_handle = 0; - DWORD rc; - char ansi_srvname[256]; - - if (servername) - uni2ansi (servername, ansi_srvname, sizeof (ansi_srvname)); - - do - { - DWORD i; - - rc = netgroupenum (servername, 2, (LPBYTE *) & buffer, 1024, - &entriesread, &totalentries, &resume_handle); - switch (rc) - { - case ERROR_ACCESS_DENIED: - fprintf (stderr, "Access denied\n"); - exit (1); - - case ERROR_MORE_DATA: - case ERROR_SUCCESS: - break; - - default: - fprintf (stderr, "NetGroupEnum() failed with %ld\n", rc); - exit (1); - } - - for (i = 0; i < entriesread; i++) - { - char groupname[100]; - char domain_name[100]; - DWORD domname_len = 100; - char psid_buffer[1024]; - PSID psid = (PSID) psid_buffer; - DWORD sid_length = 1024; - SID_NAME_USE acc_type; - - int gid = buffer[i].grpi2_group_id; - uni2ansi (buffer[i].grpi2_name, groupname, sizeof (groupname)); - if (print_sids) - { - if (!LookupAccountName (servername ? ansi_srvname : NULL, - groupname, - psid, &sid_length, - domain_name, &domname_len, - &acc_type)) - { - fprintf (stderr, - "LookupAccountName (%s, %s) failed with error %ld\n", - servername ? ansi_srvname : "NULL", - groupname, - GetLastError ()); - continue; - } - else if (acc_type == SidTypeDomain) - { - char domname[356]; - - strcpy (domname, domain_name); - strcat (domname, "\\"); - strcat (domname, groupname); - sid_length = 1024; - domname_len = 100; - if (!LookupAccountName (servername ? ansi_srvname : NULL, - domname, - psid, &sid_length, - domain_name, &domname_len, - &acc_type)) - { - fprintf (stderr, - "LookupAccountName(%s,%s) failed with error %ld\n", - servername ? ansi_srvname : "NULL", - domname, - GetLastError ()); - continue; - } - } - } - printf ("%s:%s:%d:", groupname, - print_sids ? put_sid (psid) : "", - gid + id_offset); - if (print_users) - enum_users (servername, buffer[i].grpi2_name); - printf ("\n"); - } - - netapibufferfree (buffer); - - } - while (rc == ERROR_MORE_DATA); - - if (servername) - netapibufferfree (servername); -} - -void -print_special (int print_sids, - PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt, - DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4, - DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8) -{ - char name[256], dom[256]; - DWORD len, len2, rid; - PSID sid; - SID_NAME_USE use; - - if (AllocateAndInitializeSid (auth, cnt, sub1, sub2, sub3, sub4, - sub5, sub6, sub7, sub8, &sid)) - { - if (LookupAccountSid (NULL, sid, - name, (len = 256, &len), - dom, (len2 = 256, &len), - &use)) - { - 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 ("%s:%s:%lu:\n", name, - print_sids ? put_sid (sid) : "", - rid); - } - FreeSid (sid); - } -} - -int -usage () -{ - fprintf (stderr, "Usage: mkgroup [OPTION]... [domain]\n\n"); - fprintf (stderr, "This program prints a /etc/group file to stdout\n\n"); - fprintf (stderr, "Options:\n"); - fprintf (stderr, " -l,--local print local group information\n"); - fprintf (stderr, " -d,--domain print global group information from the domain\n"); - fprintf (stderr, " specified (or from the current domain if there is\n"); - fprintf (stderr, " no domain specified)\n"); - fprintf (stderr, " -o,--id-offset offset change the default offset (10000) added to uids\n"); - fprintf (stderr, " in domain accounts.\n"); - fprintf (stderr, " -s,--no-sids don't print SIDs in pwd field\n"); - fprintf (stderr, " (this affects ntsec)\n"); - fprintf (stderr, " -u,--users print user list in gr_mem field\n"); - fprintf (stderr, " -?,--help print this message\n\n"); - fprintf (stderr, "One of `-l' or `-d' must be given on NT/W2K.\n"); - return 1; -} - -struct option longopts[] = { - {"local", no_argument, NULL, 'l'}, - {"domain", no_argument, NULL, 'd'}, - {"id-offset", required_argument, NULL, 'o'}, - {"no-sids", no_argument, NULL, 's'}, - {"users", no_argument, NULL, 'u'}, - {"help", no_argument, NULL, 'h'}, - {0, no_argument, NULL, 0} -}; - -char opts[] = "ldo:suh"; - -int -main (int argc, char **argv) -{ - LPWSTR servername; - DWORD rc = ERROR_SUCCESS; - WCHAR domain_name[100]; - int print_local = 0; - int print_domain = 0; - int print_sids = 1; - int print_users = 0; - int domain_specified = 0; - int id_offset = 10000; - int i; - - char name[256], dom[256]; - DWORD len, len2; - PSID csid; - SID_NAME_USE use; - - if (GetVersion () < 0x80000000) - { - if (argc == 1) - return usage (); - else - { - while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) - switch (i) - { - case 'l': - print_local = 1; - break; - case 'd': - print_domain = 1; - break; - case 'o': - id_offset = strtol (optarg, NULL, 10); - break; - case 's': - print_sids = 0; - break; - case 'u': - print_users = 1; - break; - case 'h': - return usage (); - default: - fprintf (stderr, "Try `%s --help' for more information.\n", argv[0]); - return 1; - } - if (!print_local && !print_domain) - { - fprintf (stderr, "%s: Specify one of `-l' or `-d'\n", argv[0]); - return 1; - } - if (optind < argc) - { - if (!print_domain) - { - fprintf (stderr, "%s: A domain name is only accepted " - "when `-d' is given.\n", argv[0]); - return 1; - } - mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1)); - domain_specified = 1; - } - } - } - - /* This takes Windows 9x/ME into account. */ - if (GetVersion () >= 0x80000000) - { - printf ("unknown::%ld:\n", DOMAIN_ALIAS_RID_ADMINS); - return 0; - } - - if (!load_netapi ()) - { - fprintf (stderr, "Failed loading symbols from netapi32.dll " - "with error %lu\n", GetLastError ()); - return 1; - } - - /* - * Get `Everyone' group - */ - print_special (print_sids, &sid_world_auth, 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0); - /* - * Get `system' group - */ - print_special (print_sids, &sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0); - if (print_local) - { - /* - * Get `None' group - */ - len = 256; - GetComputerName (name, &len); - csid = (PSID) malloc (1024); - len = 1024; - len2 = 256; - LookupAccountName (NULL, name, - csid, &len, - dom, &len, - &use); - print_special (print_sids, GetSidIdentifierAuthority (csid), 5, - *GetSidSubAuthority (csid, 0), - *GetSidSubAuthority (csid, 1), - *GetSidSubAuthority (csid, 2), - *GetSidSubAuthority (csid, 3), - 513, - 0, - 0, - 0); - free (csid); - } - - if (print_domain) - { - if (domain_specified) - rc = netgetdcname (NULL, domain_name, (LPBYTE *) & servername); - - else - rc = netgetdcname (NULL, NULL, (LPBYTE *) & servername); - - if (rc != ERROR_SUCCESS) - { - fprintf (stderr, "Cannot get PDC, code = %ld\n", rc); - exit (1); - } - - enum_groups (servername, print_sids, print_users, id_offset); - } - - if (print_local) - enum_local_groups (print_sids, print_users); - - return 0; -} diff --git a/winsup/utils/mkpasswd.c b/winsup/utils/mkpasswd.c deleted file mode 100644 index f0b41eccb..000000000 --- a/winsup/utils/mkpasswd.c +++ /dev/null @@ -1,595 +0,0 @@ -/* mkpasswd.c: - - 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 - Cygwin license. Please consult the file "CYGWIN_LICENSE" for - details. */ - -#include <ctype.h> -#include <stdlib.h> -#include <wchar.h> -#include <stdio.h> -#include <windows.h> -#include <io.h> -#include <sys/cygwin.h> -#include <getopt.h> -#include <lmaccess.h> -#include <lmapibuf.h> -#include <sys/fcntl.h> -#include <lmerr.h> - -SID_IDENTIFIER_AUTHORITY sid_world_auth = {SECURITY_WORLD_SID_AUTHORITY}; -SID_IDENTIFIER_AUTHORITY sid_nt_auth = {SECURITY_NT_AUTHORITY}; - -NET_API_STATUS WINAPI (*netapibufferfree)(PVOID); -NET_API_STATUS WINAPI (*netuserenum)(LPWSTR,DWORD,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); -NET_API_STATUS WINAPI (*netlocalgroupenum)(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); -NET_API_STATUS WINAPI (*netgetdcname)(LPWSTR,LPWSTR,PBYTE*); -NET_API_STATUS WINAPI (*netusergetinfo)(LPWSTR,LPWSTR,DWORD,PBYTE*); - -#ifndef min -#define min(a,b) (((a)<(b))?(a):(b)) -#endif - -BOOL -load_netapi () -{ - HANDLE h = LoadLibrary ("netapi32.dll"); - - if (!h) - return FALSE; - - if (!(netapibufferfree = (void *) GetProcAddress (h, "NetApiBufferFree"))) - return FALSE; - if (!(netuserenum = (void *) GetProcAddress (h, "NetUserEnum"))) - return FALSE; - if (!(netlocalgroupenum = (void *) GetProcAddress (h, "NetLocalGroupEnum"))) - return FALSE; - if (!(netgetdcname = (void *) GetProcAddress (h, "NetGetDCName"))) - return FALSE; - if (!(netusergetinfo = (void *) GetProcAddress (h, "NetUserGetInfo"))) - return FALSE; - - return TRUE; -} - -char * -put_sid (PSID sid) -{ - static char s[512]; - char t[32]; - DWORD i; - - strcpy (s, "S-1-"); - sprintf(t, "%u", GetSidIdentifierAuthority (sid)->Value[5]); - strcat (s, t); - for (i = 0; i < *GetSidSubAuthorityCount (sid); ++i) - { - sprintf(t, "-%lu", *GetSidSubAuthority (sid, i)); - strcat (s, t); - } - return s; -} - -void -psx_dir (char *in, char *out) -{ - if (isalpha (in[0]) && in[1] == ':') - { - sprintf (out, "/cygdrive/%c", in[0]); - in += 2; - out += strlen (out); - } - - while (*in) - { - if (*in == '\\') - *out = '/'; - else - *out = *in; - in++; - out++; - } - - *out = '\0'; -} - -void -uni2ansi (LPWSTR wcs, char *mbs, int size) -{ - if (wcs) - WideCharToMultiByte (CP_ACP, 0, wcs, -1, mbs, size, NULL, NULL); - else - *mbs = '\0'; -} - -void -print_win_error(DWORD code) -{ - char buf[4096]; - - if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - code, - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) buf, sizeof (buf), NULL)) - fprintf (stderr, "mkpasswd: [%lu] %s", code, buf); - else - fprintf (stderr, "mkpasswd: error %lu", code); -} - -int -enum_users (LPWSTR servername, int print_sids, int print_cygpath, - const char * passed_home_path, int id_offset, char *disp_username) -{ - USER_INFO_3 *buffer; - DWORD entriesread = 0; - DWORD totalentries = 0; - DWORD resume_handle = 0; - DWORD rc; - char ansi_srvname[256]; - WCHAR uni_name[512]; - - if (servername) - uni2ansi (servername, ansi_srvname, sizeof (ansi_srvname)); - - do - { - DWORD i; - - if (disp_username != NULL) - { - MultiByteToWideChar (CP_ACP, 0, disp_username, -1, uni_name, 512 ); - rc = netusergetinfo(servername, (LPWSTR) & uni_name, 3, - (LPBYTE *) &buffer ); - entriesread=1; - } - else - rc = netuserenum (servername, 3, FILTER_NORMAL_ACCOUNT, - (LPBYTE *) & buffer, 1024, - &entriesread, &totalentries, &resume_handle); - switch (rc) - { - case ERROR_ACCESS_DENIED: - print_win_error(rc); - exit (1); - - case ERROR_MORE_DATA: - case ERROR_SUCCESS: - break; - - default: - print_win_error(rc); - exit (1); - } - - for (i = 0; i < entriesread; i++) - { - char username[100]; - char fullname[100]; - char homedir_psx[MAX_PATH]; - char homedir_w32[MAX_PATH]; - char domain_name[100]; - DWORD domname_len = 100; - char psid_buffer[1024]; - PSID psid = (PSID) psid_buffer; - DWORD sid_length = 1024; - SID_NAME_USE acc_type; - - int uid = buffer[i].usri3_user_id; - int gid = buffer[i].usri3_primary_group_id; - uni2ansi (buffer[i].usri3_name, username, sizeof (username)); - uni2ansi (buffer[i].usri3_full_name, fullname, sizeof (fullname)); - homedir_w32[0] = homedir_psx[0] = '\0'; - if (passed_home_path[0] == '\0') - { - uni2ansi (buffer[i].usri3_home_dir, homedir_w32, - sizeof (homedir_w32)); - if (homedir_w32[0] != '\0') - { - if (print_cygpath) - cygwin_conv_to_posix_path (homedir_w32, homedir_psx); - else - psx_dir (homedir_w32, homedir_psx); - } - else - { - strcpy (homedir_psx, "/home/"); - strcat (homedir_psx, username); - } - } - else - { - strcpy (homedir_psx, passed_home_path); - strcat (homedir_psx, username); - } - - if (print_sids) - { - if (!LookupAccountName (servername ? ansi_srvname : NULL, - username, - psid, &sid_length, - domain_name, &domname_len, - &acc_type)) - { - print_win_error(GetLastError ()); - continue; - } - else if (acc_type == SidTypeDomain) - { - char domname[356]; - - strcpy (domname, domain_name); - strcat (domname, "\\"); - strcat (domname, username); - sid_length = 1024; - domname_len = 100; - if (!LookupAccountName (servername ? ansi_srvname : NULL, - domname, - psid, &sid_length, - domain_name, &domname_len, - &acc_type)) - { - print_win_error(GetLastError ()); - continue; - } - } - } - printf ("%s:unused_by_nt/2000/xp:%d:%d:%s%s%s%s%s%s%s%s:%s:/bin/bash\n", - username, - uid + id_offset, - gid + id_offset, - fullname, - print_sids && fullname[0] ? "," : "", - print_sids ? "U-" : "", - print_sids ? domain_name : "", - print_sids && domain_name[0] ? "\\" : "", - print_sids ? username : "", - print_sids ? "," : "", - print_sids ? put_sid (psid) : "", - homedir_psx); - } - - netapibufferfree (buffer); - - } - while (rc == ERROR_MORE_DATA); - - if (servername) - netapibufferfree (servername); - - return 0; -} - -int -enum_local_groups (int print_sids) -{ - LOCALGROUP_INFO_0 *buffer; - DWORD entriesread = 0; - DWORD totalentries = 0; - DWORD resume_handle = 0; - DWORD rc ; - - do - { - DWORD i; - - rc = netlocalgroupenum (NULL, 0, (LPBYTE *) & buffer, 1024, - &entriesread, &totalentries, &resume_handle); - switch (rc) - { - case ERROR_ACCESS_DENIED: - print_win_error(rc); - exit (1); - - case ERROR_MORE_DATA: - case ERROR_SUCCESS: - break; - - default: - print_win_error(rc); - exit (1); - } - - for (i = 0; i < entriesread; i++) - { - char localgroup_name[100]; - char domain_name[100]; - DWORD domname_len = 100; - char psid_buffer[1024]; - PSID psid = (PSID) psid_buffer; - DWORD sid_length = 1024; - DWORD gid; - SID_NAME_USE acc_type; - uni2ansi (buffer[i].lgrpi0_name, localgroup_name, sizeof (localgroup_name)); - - if (!LookupAccountName (NULL, localgroup_name, psid, - &sid_length, domain_name, &domname_len, - &acc_type)) - { - print_win_error(GetLastError ()); - continue; - } - else if (acc_type == SidTypeDomain) - { - char domname[356]; - - strcpy (domname, domain_name); - strcat (domname, "\\"); - strcat (domname, localgroup_name); - sid_length = 1024; - domname_len = 100; - if (!LookupAccountName (NULL, domname, - psid, &sid_length, - domain_name, &domname_len, - &acc_type)) - { - print_win_error(GetLastError ()); - continue; - } - } - - gid = *GetSidSubAuthority (psid, *GetSidSubAuthorityCount(psid) - 1); - - printf ("%s:*:%ld:%ld:%s%s::\n", localgroup_name, gid, gid, - print_sids ? "," : "", - print_sids ? put_sid (psid) : ""); - } - - netapibufferfree (buffer); - - } - while (rc == ERROR_MORE_DATA); - - return 0; -} - -void -print_special (int print_sids, - PSID_IDENTIFIER_AUTHORITY auth, BYTE cnt, - DWORD sub1, DWORD sub2, DWORD sub3, DWORD sub4, - DWORD sub5, DWORD sub6, DWORD sub7, DWORD sub8) -{ - char name[256], dom[256]; - DWORD len, len2, rid; - PSID sid; - SID_NAME_USE use; - - if (AllocateAndInitializeSid (auth, cnt, sub1, sub2, sub3, sub4, - sub5, sub6, sub7, sub8, &sid)) - { - if (LookupAccountSid (NULL, sid, - name, (len = 256, &len), - dom, (len2 = 256, &len), - &use)) - { - 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 ("%s:*:%lu:%lu:%s%s::\n", - name, rid, rid, - print_sids ? "," : "", - print_sids ? put_sid (sid) : ""); - } - FreeSid (sid); - } -} - -int -usage () -{ - fprintf (stderr, "Usage: mkpasswd [OPTION]... [domain]\n\n"); - fprintf (stderr, "This program prints a /etc/passwd file to stdout\n\n"); - fprintf (stderr, "Options:\n"); - fprintf (stderr, " -l,--local print local user accounts\n"); - fprintf (stderr, " -d,--domain print domain accounts (from current domain\n"); - fprintf (stderr, " if no domain specified)\n"); - fprintf (stderr, " -o,--id-offset offset change the default offset (10000) added to uids\n"); - fprintf (stderr, " in domain accounts.\n"); - fprintf (stderr, " -g,--local-groups print local group information too\n"); - fprintf (stderr, " if no domain specified\n"); - fprintf (stderr, " -m,--no-mount don't use mount points for home dir\n"); - fprintf (stderr, " -s,--no-sids don't print SIDs in GCOS field\n"); - fprintf (stderr, " (this affects ntsec)\n"); - fprintf (stderr, " -p,--path-to-home path use specified path instead of user account home dir\n"); - fprintf (stderr, " -u,--username username only return information for the specified user\n"); - fprintf (stderr, " -?,--help displays this message\n\n"); - fprintf (stderr, "One of `-l', `-d' or `-g' must be given on NT/W2K.\n"); - return 1; -} - -struct option longopts[] = { - {"local", no_argument, NULL, 'l'}, - {"domain", no_argument, NULL, 'd'}, - {"id-offset", required_argument, NULL, 'o'}, - {"local-groups", no_argument, NULL, 'g'}, - {"no-mount", no_argument, NULL, 'm'}, - {"no-sids", no_argument, NULL, 's'}, - {"path-to-home", required_argument, NULL, 'p'}, - {"username", required_argument, NULL, 'u'}, - {"help", no_argument, NULL, 'h'}, - {0, no_argument, NULL, 0} -}; - -char opts[] = "ldo:gsmhp:u:"; - -int -main (int argc, char **argv) -{ - LPWSTR servername = NULL; - DWORD rc = ERROR_SUCCESS; - WCHAR domain_name[200]; - int print_local = 0; - int print_domain = 0; - int print_local_groups = 0; - int domain_name_specified = 0; - int print_sids = 1; - int print_cygpath = 1; - int id_offset = 10000; - int i; - char *disp_username = NULL; - - char name[256], passed_home_path[MAX_PATH]; - DWORD len; - - passed_home_path[0] = '\0'; - setmode (1, O_BINARY); - - if (GetVersion () < 0x80000000) - { - if (argc == 1) - return usage (); - else - { - while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) - switch (i) - { - case 'l': - print_local = 1; - break; - case 'd': - print_domain = 1; - break; - case 'o': - id_offset = strtol (optarg, NULL, 10); - break; - case 'g': - print_local_groups = 1; - break; - case 's': - print_sids = 0; - break; - case 'm': - print_cygpath = 0; - break; - case 'p': - if (optarg[0] != '/') - { - fprintf (stderr, "%s: `%s' is not a fully qualified path.\n", - argv[0], optarg); - return 1; - } - strcpy (passed_home_path, optarg); - if (optarg[strlen (optarg)-1] != '/') - strcat (passed_home_path, "/"); - break; - case 'u': - disp_username = optarg; - break; - case 'h': - return usage (); - default: - fprintf (stderr, "Try `%s --help' for more information.\n", argv[0]); - return 1; - } - if (!print_local && !print_domain && !print_local_groups) - { - fprintf (stderr, "%s: Specify one of `-l', `-d' or `-g'\n", argv[0]); - return 1; - } - if (optind < argc) - { - if (!print_domain) - { - fprintf (stderr, "%s: A domain name is only accepted " - "when `-d' is given.\n", argv[0]); - return 1; - } - mbstowcs (domain_name, argv[optind], (strlen (argv[optind]) + 1)); - domain_name_specified = 1; - } - } - } - - /* This takes Windows 9x/ME into account. */ - if (GetVersion () >= 0x80000000) - { - /* Same behaviour as in cygwin/uinfo.cc (internal_getlogin). */ - if (!GetUserName (name, (len = 256, &len))) - strcpy (name, "unknown"); - - if (passed_home_path[0] == '\0') - strcpy (passed_home_path, "/home/"); - - printf ("%s::%ld:%ld::%s%s:/bin/bash\n", name, - DOMAIN_USER_RID_ADMIN, - DOMAIN_ALIAS_RID_ADMINS, - passed_home_path, - name); - - return 0; - } - - if (!load_netapi ()) - { - print_win_error(GetLastError ()); - return 1; - } - - /* - * Get `Everyone' group - */ - if (disp_username == NULL) - { - print_special (print_sids, &sid_world_auth, 1, SECURITY_WORLD_RID, - 0, 0, 0, 0, 0, 0, 0); - /* - * Get `system' group - */ - print_special (print_sids, &sid_nt_auth, 1, SECURITY_LOCAL_SYSTEM_RID, - 0, 0, 0, 0, 0, 0, 0); - /* - * Get `administrators' group - */ - if (!print_local_groups) - print_special (print_sids, &sid_nt_auth, 2, SECURITY_BUILTIN_DOMAIN_RID, - DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0); - - if (print_local_groups) - enum_local_groups (print_sids); - } - - if (print_domain) - { - if (domain_name_specified) - rc = netgetdcname (NULL, domain_name, (LPBYTE *) & servername); - - else - rc = netgetdcname (NULL, NULL, (LPBYTE *) & servername); - - if (rc != ERROR_SUCCESS) - { - print_win_error(rc); - exit (1); - } - - enum_users (servername, print_sids, print_cygpath, passed_home_path, - id_offset, disp_username); - } - - if (print_local) - enum_users (NULL, print_sids, print_cygpath, passed_home_path, 0, - disp_username); - - if (servername) - netapibufferfree (servername); - - return 0; -} diff --git a/winsup/utils/module_info.cc b/winsup/utils/module_info.cc deleted file mode 100644 index c0e7079cc..000000000 --- a/winsup/utils/module_info.cc +++ /dev/null @@ -1,114 +0,0 @@ -/* module_info.cc - - Copyright 1999,2000,2001 Red Hat, Inc. - - Written by Egor Duda <deo@logos-m.ru> - -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 <stdlib.h> -#include <windows.h> -#include <psapi.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. */ - -char * -psapi_get_module_name (HANDLE hProcess, DWORD BaseAddress) -{ - DWORD len; - MODULEINFO mi; - unsigned int i; - HMODULE dh_buf[1]; - HMODULE *DllHandle = dh_buf; - DWORD cbNeeded; - BOOL ok; - - 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); - - if (!ok || !cbNeeded) - goto failed; - DllHandle = (HMODULE *) malloc (cbNeeded); - if (!DllHandle) - goto failed; - ok = (*psapi_EnumProcessModules) (hProcess, DllHandle, cbNeeded, &cbNeeded); - if (!ok) - { - free (DllHandle); - goto failed; - } - - for (i = 0; i < cbNeeded / sizeof (HMODULE); i++) - { - if (!(*psapi_GetModuleInformation) (hProcess, - DllHandle[i], &mi, sizeof (mi))) - { - free (DllHandle); - goto failed; - } - - len = (*psapi_GetModuleFileNameExA) (hProcess, - DllHandle[i], name_buf, MAX_PATH); - if (len == 0) - { - free (DllHandle); - goto failed; - } - - if ((DWORD) (mi.lpBaseOfDll) == BaseAddress) - { - free (DllHandle); - return strdup (name_buf); - } - } - -failed: - return NULL; -} diff --git a/winsup/utils/mount.cc b/winsup/utils/mount.cc deleted file mode 100644 index 00c662e62..000000000 --- a/winsup/utils/mount.cc +++ /dev/null @@ -1,408 +0,0 @@ -/* mount.cc - - Copyright 1996, 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 -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#include <stdio.h> -#include <sys/mount.h> -#include <sys/stat.h> -#include <mntent.h> -#include <windows.h> -#include <sys/cygwin.h> -#include <stdlib.h> -#include <getopt.h> - -#ifdef errno -#undef errno -#endif -#include <errno.h> - -static void mount_commands (void); -static void show_mounts (void); -static void show_cygdrive_info (void); -static void change_cygdrive_prefix (const char *new_prefix, int flags); -static int mount_already_exists (const char *posix_path, int flags); - -// static short create_missing_dirs = FALSE; -static short force = FALSE; - -static const char *progname; - -static void -error (const char *path) -{ - fprintf (stderr, "%s: %s: %s\n", progname, path, - (errno == EMFILE) ? "Too many mount entries" : strerror (errno)); - exit (1); -} - -/* FIXME: do_mount should also print a warning message if the dev arg - is a non-existent Win32 path. */ - -static void -do_mount (const char *dev, const char *where, int flags) -{ - struct stat statbuf; - char win32_path[MAX_PATH]; - int statres; - - cygwin_conv_to_win32_path (where, win32_path); - - statres = stat (win32_path, &statbuf); - -#if 0 - if (statres == -1) - { - /* FIXME: this'll fail if mount dir is missing any parent dirs */ - if (create_missing_dirs == TRUE) - { - if (mkdir (where, 0755) == -1) - fprintf (stderr, "Warning: unable to create %s!\n", where); - else - statres = 0; /* Pretend stat succeeded if we could mkdir. */ - } - } -#endif - - if (mount (dev, where, flags)) - error (where); - - if (statres == -1) - { - if (force == FALSE) - fprintf (stderr, "%s: warning - %s does not exist.\n", progname, where); - } - else if (!(statbuf.st_mode & S_IFDIR)) - { - if (force == FALSE) - fprintf (stderr, "%s: warning: %s is not a directory.\n", progname, where); - } - - exit (0); -} - -struct option longopts[] = -{ - {"help", no_argument, NULL, 'h' }, - {"binary", no_argument, NULL, 'b'}, - {"force", no_argument, NULL, 'f'}, - {"system", no_argument, NULL, 's'}, - {"text", no_argument, NULL, 't'}, - {"user", no_argument, NULL, 'u'}, - {"executable", no_argument, NULL, 'x'}, - {"change-cygdrive-prefix", no_argument, NULL, 'c'}, - {"cygwin-executable", no_argument, NULL, 'X'}, - {"show-cygdrive-prefix", no_argument, NULL, 'p'}, - {"import-old-mounts", no_argument, NULL, 'i'}, - {"mount-commands", no_argument, NULL, 'm'}, - {NULL, 0, NULL, 0} -}; - -char opts[] = "hbfstuxXpicm"; - -static void -usage (void) -{ - fprintf (stderr, "Usage: %s [OPTION] [<win32path> <posixpath>]\n\ - -b, --binary text files are equivalent to binary files\n\ - (newline = \\n)\n\ - -c, --change-cygdrive-prefix change the cygdrive path prefix to <posixpath>\n\ - -f, --force force mount, don't warn about missing mount\n\ - point directories\n\ - -i, --import-old-mounts copy old registry mount table mounts into the\n\ - current mount areas\n\ - -p, --show-cygdrive-prefix show user and/or system cygdrive path prefix\n\ - -s, --system add mount point to system-wide registry location\n\ - -t, --text (default) text files get \\r\\n line endings\n\ - -u, --user (default) add mount point to user registry location\n\ - -x, --executable treat all files under mount point as executables\n\ - -X, --cygwin-executable treat all files under mount point as cygwin\n\ - executables\n\ - -m, --mount-commands write mount commands to replace user and\n\ - system mount points and cygdrive prefixes\n\ -", progname); - exit (1); -} - -int -main (int argc, char **argv) -{ - int i; - int flags = 0; - enum do_what - { - nada, - saw_change_cygdrive_prefix, - saw_import_old_mounts, - saw_show_cygdrive_prefix, - saw_mount_commands - } do_what = nada; - - progname = argv[0]; - - if (argc == 1) - { - show_mounts (); - exit (0); - } - - while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) - switch (i) - { - case 'b': - flags |= MOUNT_BINARY; - break; - case 'c': - if (do_what == nada) - do_what = saw_change_cygdrive_prefix; - else - usage (); - break; - case 'f': - force = TRUE; - break; - case 'i': - if (do_what == nada) - do_what = saw_import_old_mounts; - else - usage (); - break; - case 'p': - if (do_what == nada) - do_what = saw_show_cygdrive_prefix; - else - usage (); - break; - case 's': - flags |= MOUNT_SYSTEM; - break; - case 't': - flags &= ~MOUNT_BINARY; - break; - case 'u': - flags &= ~MOUNT_SYSTEM; - break; - case 'X': - flags |= MOUNT_CYGWIN_EXEC; - break; - case 'x': - flags |= MOUNT_EXEC; - break; - case 'm': - if (do_what == nada) - do_what = saw_mount_commands; - else - usage (); - break; - default: - usage (); - } - - argc--; - switch (do_what) - { - case saw_change_cygdrive_prefix: - if (optind != argc) - usage (); - change_cygdrive_prefix (argv[optind], flags); - break; - case saw_import_old_mounts: - if (optind <= argc) - usage (); - else - cygwin_internal (CW_READ_V1_MOUNT_TABLES); - break; - case saw_show_cygdrive_prefix: - if (optind <= argc) - usage (); - show_cygdrive_info (); - break; - case saw_mount_commands: - if (optind <= argc) - usage (); - mount_commands (); - break; - default: - if (optind != (argc - 1)) - { - if (optind >= argc) - fprintf (stderr, "%s: not enough arguments\n", progname); - else - fprintf (stderr, "%s: too many arguments\n", progname); - usage (); - } - if (force || !mount_already_exists (argv[optind + 1], flags)) - do_mount (argv[optind], argv[optind + 1], flags); - else - { - errno = EBUSY; - error (argv[optind + 1]); - } - } - - /* NOTREACHED */ - return 0; -} - -static void -mount_commands (void) -{ - FILE *m = setmntent ("/-not-used-", "r"); - struct mntent *p; - char *c; - const char *format_mnt = "mount%s \"%s\" \"%s\"\n"; - const char *format_cyg = "mount%s --change-cygdrive-prefix \"%s\"\n"; - char opts[MAX_PATH]; - char user[MAX_PATH]; - char system[MAX_PATH]; - char user_flags[MAX_PATH]; - char system_flags[MAX_PATH]; - - // write mount commands for user and system mount points - while ((p = getmntent (m)) != NULL) { - // Only list non-cygdrives - if (!strstr (p->mnt_opts, ",noumount")) { - strcpy(opts, " -f"); - if (p->mnt_type[0] == 'u') - strcat (opts, " -u"); - else if (p->mnt_type[0] == 's') - strcat (opts, " -s"); - if (p->mnt_opts[0] == 'b') - strcat (opts, " -b"); - else if (p->mnt_opts[0] == 't') - strcat (opts, " -t"); - if (strstr (p->mnt_opts, ",exec")) - strcat (opts, " -x"); - while ((c = strchr (p->mnt_fsname, '\\')) != NULL) - *c = '/'; - printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir); - } - } - endmntent (m); - - // write mount commands for cygdrive prefixes - cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags, - system_flags); - if (strlen (user) > 0) { - strcpy (opts, " "); - if (user_flags[0] == 'b') - strcat (opts, " -b"); - else if (user_flags[0] == 't') - strcat (opts, " -t"); - printf (format_cyg, opts, user); - } - if (strlen (system) > 0) { - strcpy (opts, " -s"); - if (system_flags[0] == 'b') - strcat (opts, " -b"); - else if (system_flags[0] == 't') - strcat (opts, " -t"); - printf (format_cyg, opts, system); - } - - exit(0); -} - -static void -show_mounts (void) -{ - FILE *m = setmntent ("/-not-used-", "r"); - struct mntent *p; - const char *format = "%s on %s type %s (%s)\n"; - - // printf (format, "Device", "Directory", "Type", "Flags"); - while ((p = getmntent (m)) != NULL) - printf (format, p->mnt_fsname, p->mnt_dir, p->mnt_type, p->mnt_opts); - endmntent (m); -} - -/* Return 1 if mountpoint from the same registry area is already in - mount table. Otherwise return 0. */ -static int -mount_already_exists (const char *posix_path, int flags) -{ - int found_matching = 0; - - FILE *m = setmntent ("/-not-used-", "r"); - struct mntent *p; - - while ((p = getmntent (m)) != NULL) - { - /* if the paths match, and they're both the same type of mount. */ - if (strcmp (p->mnt_dir, posix_path) == 0) - { - if (p->mnt_type[0] == 'u') - { - if (!(flags & MOUNT_SYSTEM)) /* both current_user */ - found_matching = 1; - else - fprintf (stderr, - "%s: warning: system mount point of '%s' " - "will always be masked by user mount.\n", - progname, posix_path); - break; - } - else if (p->mnt_type[0] == 's') - { - if (flags & MOUNT_SYSTEM) /* both system */ - found_matching = 1; - else - fprintf (stderr, - "%s: warning: user mount point of '%s' " - "masks system mount.\n", - progname, posix_path); - break; - } - else - { - fprintf (stderr, "%s: warning: couldn't determine mount type.\n", progname); - break; - } - } - } - endmntent (m); - - return found_matching; -} - -/* change_cygdrive_prefix: Change the cygdrive prefix */ -static void -change_cygdrive_prefix (const char *new_prefix, int flags) -{ - flags |= MOUNT_AUTO; - - if (mount (NULL, new_prefix, flags)) - error (new_prefix); - - exit (0); -} - -/* show_cygdrive_info: Show the user and/or cygdrive info, i.e., prefix and - flags.*/ -static void -show_cygdrive_info () -{ - /* Get the cygdrive info */ - char user[MAX_PATH]; - char system[MAX_PATH]; - char user_flags[MAX_PATH]; - char system_flags[MAX_PATH]; - cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags, - system_flags); - - /* Display the user and system cygdrive path prefix, if necessary - (ie, not empty) */ - const char *format = "%-18s %-11s %s\n"; - printf (format, "Prefix", "Type", "Flags"); - if (strlen (user) > 0) - printf (format, user, "user", user_flags); - if (strlen (system) > 0) - printf (format, system, "system", system_flags); - - exit (0); -} diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc deleted file mode 100644 index 07242da87..000000000 --- a/winsup/utils/parse_pe.cc +++ /dev/null @@ -1,91 +0,0 @@ -/* parse_pe.cc - - Copyright 1999,2000,2001 Red Hat, Inc. - - Written by Egor Duda <deo@logos-m.ru> - - 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 <bfd.h> -#include <stdio.h> -#include <stdlib.h> - -#include "dumper.h" - -int -exclusion::add (LPBYTE mem_base, DWORD mem_size) -{ - while (last >= size) - size += step; - region = (process_mem_region *) realloc (region, size * sizeof (process_mem_region)); - if (region == NULL) - return 0; - region[last].base = mem_base; - region[last].size = mem_size; - last++; - return 1; -}; - -int -cmp_regions (const void *r1, const void *r2) -{ - if (((process_mem_region *) r1)->base < ((process_mem_region *) r2)->base) - return -1; - if (((process_mem_region *) r1)->base > ((process_mem_region *) r2)->base) - return 1; - return 0; -} - -int -exclusion::sort_and_check () -{ - qsort (region, last, sizeof (process_mem_region), &cmp_regions); - for (process_mem_region * p = region; p < region + last - 1; p++) - { - process_mem_region *q = p + 1; - if (p->base + size > q->base) - { - fprintf (stderr, "region error @ %08x", (unsigned) p->base); - return 0; - } - } - return 1; -} - -static void -select_data_section (bfd * abfd, asection * sect, PTR obj) -{ - exclusion *excl_list = (exclusion *) obj; - - if ((sect->flags & (SEC_CODE | SEC_DEBUGGING)) && - sect->vma && sect->_raw_size) - { - excl_list->add ((LPBYTE) sect->vma, (DWORD) sect->_raw_size); - deb_printf ("excluding section: %20s %08lx\n", sect->name, sect->_raw_size); - } -} - -int -parse_pe (const char *file_name, exclusion * excl_list) -{ - if (file_name == NULL || excl_list == NULL) - return 0; - - bfd *abfd = bfd_openr (file_name, "pei-i386"); - if (abfd == NULL) - { - bfd_perror ("failed to open file"); - return 0; - } - - bfd_check_format (abfd, bfd_object); - bfd_map_over_sections (abfd, &select_data_section, (PTR) excl_list); - excl_list->sort_and_check (); - - bfd_close (abfd); - return 1; -} diff --git a/winsup/utils/passwd.c b/winsup/utils/passwd.c deleted file mode 100644 index 9a90f6e4a..000000000 --- a/winsup/utils/passwd.c +++ /dev/null @@ -1,355 +0,0 @@ -/* passwd.c: Changing passwords and managing account information - - Copyright 1999 Cygnus Solutions. - - Written by Corinna Vinschen <corinna.vinschen@cityweb.de> - -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 <unistd.h> -#include <getopt.h> -#include <pwd.h> -#include <sys/types.h> -#include <time.h> - -#include <windows.h> -#include <lmaccess.h> -#include <lmerr.h> -#include <lmcons.h> -#include <lmapibuf.h> - -#define USER_PRIV_ADMIN 2 - -#define UF_LOCKOUT 0x00010 - -char *myname; - -int -eprint (int with_name, const char *fmt, ...) -{ - va_list ap; - - if (with_name) - fprintf(stderr, "%s: ", myname); - va_start (ap, fmt); - vfprintf (stderr, fmt, ap); - va_end (ap); - fprintf(stderr, "\n"); - return 1; -} - -int -EvalRet (int ret, const char *user) -{ - switch (ret) - { - case NERR_Success: - return 0; - - case ERROR_ACCESS_DENIED: - if (! user) - eprint (0, "You may not change password expiry information."); - else - eprint (0, "You may not change the password for %s.", user); - break; - - eprint (0, "Bad password: Invalid."); - break; - - case NERR_PasswordTooShort: - eprint (0, "Bad password: Too short."); - break; - - case NERR_UserNotFound: - eprint (1, "unknown user %s", user); - break; - - case ERROR_INVALID_PASSWORD: - case NERR_BadPassword: - eprint (0, "Incorrect password for %s.", user); - eprint (0, "The password for %s is unchanged.", user); - break; - - default: - eprint (1, "unrecoverable error %d", ret); - break; - } - return 1; -} - -PUSER_INFO_3 -GetPW (const char *user) -{ - WCHAR name[512]; - DWORD ret; - PUSER_INFO_3 ui; - - MultiByteToWideChar (CP_ACP, 0, user, -1, name, 512); - ret = NetUserGetInfo (NULL, name, 3, (LPBYTE *) &ui); - return EvalRet (ret, user) ? NULL : ui; -} - -int -ChangePW (const char *user, const char *oldpwd, const char *pwd, int justcheck) -{ - WCHAR name[512], oldpass[512], pass[512]; - DWORD ret; - - MultiByteToWideChar (CP_ACP, 0, user, -1, name, 512); - MultiByteToWideChar (CP_ACP, 0, pwd, -1, pass, 512); - if (! oldpwd) - { - USER_INFO_1003 ui; - - ui.usri1003_password = pass; - ret = NetUserSetInfo (NULL, name, 1003, (LPBYTE) &ui, NULL); - } - else - { - MultiByteToWideChar (CP_ACP, 0, oldpwd, -1, oldpass, 512); - ret = NetUserChangePassword (NULL, name, oldpass, pass); - } - if (justcheck && ret != ERROR_INVALID_PASSWORD) - return 0; - if (! EvalRet (ret, user) && ! justcheck) - { - eprint (0, "Password changed."); - } - return ret; -} - -void -PrintPW (PUSER_INFO_3 ui) -{ - time_t t = time (NULL) - ui->usri3_password_age; - int ret; - PUSER_MODALS_INFO_0 mi; - - printf ("Account disabled : %s", (ui->usri3_flags & UF_ACCOUNTDISABLE) - ? "yes\n" : "no\n"); - printf ("Password required: %s", (ui->usri3_flags & UF_PASSWD_NOTREQD) - ? "no\n" : "yes\n"); - printf ("Password expired : %s", (ui->usri3_password_expired) - ? "yes\n" : "no\n"); - printf ("Password changed : %s", ctime(&t)); - ret = NetUserModalsGet (NULL, 0, (LPBYTE *) &mi); - if (! ret) - { - if (mi->usrmod0_max_passwd_age == TIMEQ_FOREVER - || ui->usri3_priv == USER_PRIV_ADMIN) - mi->usrmod0_max_passwd_age = 0; - if (mi->usrmod0_min_passwd_age == TIMEQ_FOREVER - || ui->usri3_priv == USER_PRIV_ADMIN) - mi->usrmod0_min_passwd_age = 0; - if (mi->usrmod0_force_logoff == TIMEQ_FOREVER - || ui->usri3_priv == USER_PRIV_ADMIN) - mi->usrmod0_force_logoff = 0; - if (ui->usri3_priv == USER_PRIV_ADMIN) - mi->usrmod0_min_passwd_len = 0; - printf ("Max. password age %ld days\n", - mi->usrmod0_max_passwd_age / ONE_DAY); - printf ("Min. password age %ld days\n", - mi->usrmod0_min_passwd_age / ONE_DAY); - printf ("Force logout after %ld days\n", - mi->usrmod0_force_logoff / ONE_DAY); - printf ("Min. password length: %ld\n", - mi->usrmod0_min_passwd_len); - } -} - -int -SetModals (int xarg, int narg, int iarg, int Larg) -{ - int ret; - PUSER_MODALS_INFO_0 mi; - - ret = NetUserModalsGet (NULL, 0, (LPBYTE *) &mi); - if (! ret) - { - if (xarg == 0) - mi->usrmod0_max_passwd_age = TIMEQ_FOREVER; - else if (xarg > 0) - mi->usrmod0_max_passwd_age = xarg * ONE_DAY; - - if (narg == 0) - { - mi->usrmod0_min_passwd_age = TIMEQ_FOREVER; - mi->usrmod0_password_hist_len = 0; - } - else if (narg > 0) - mi->usrmod0_min_passwd_age = narg * ONE_DAY; - - if (iarg == 0) - mi->usrmod0_force_logoff = TIMEQ_FOREVER; - else if (iarg > 0) - mi->usrmod0_force_logoff = iarg * ONE_DAY; - - if (Larg >= 0) - mi->usrmod0_min_passwd_len = Larg; - - ret = NetUserModalsSet (NULL, 0, (LPBYTE) mi, NULL); - NetApiBufferFree (mi); - } - return EvalRet (ret, NULL); -} - -int -usage () -{ - fprintf (stderr, "usage: %s [name]\n", myname); - fprintf (stderr, " %s [-L maxlen] [-x max] [-n min] [-i inact]\n", - myname); - fprintf (stderr, " %s {-l|-u|-S} name\n", myname); - return 2; -} - -int -main (int argc, char **argv) -{ - char *c; - char user[64], oldpwd[64], newpwd[64]; - int ret = 0; - int cnt = 0; - int opt; - int Larg = -1; - int xarg = -1; - int narg = -1; - int iarg = -1; - int lopt = 0; - int uopt = 0; - int Sopt = 0; - PUSER_INFO_3 ui, li; - - if ((myname = strrchr (argv[0], '/')) - || (myname = strrchr (argv[0], '\\'))) - ++myname; - else - myname = argv[0]; - c = strrchr (myname, '.'); - if (c) - *c = '\0'; - - while ((opt = getopt (argc, argv, "L:x:n:i:luS")) != EOF) - switch (opt) - { - case 'x': - if ((xarg = atoi (optarg)) < 0 || xarg > 999) - return eprint (1, "Maximum password age must be between 0 and 999."); - if (narg >= 0 && xarg < narg) - return eprint (1, "Maximum password age must be greater than " - "minimum password age."); - break; - - case 'n': - if ((narg = atoi (optarg)) < 0 || narg > 999) - return eprint (1, "Minimum password age must be between 0 and 999."); - if (xarg >= 0 && narg > xarg) - return eprint (1, "Minimum password age must be less than " - "maximum password age."); - break; - - case 'i': - if ((iarg = atoi (optarg)) < 0 || iarg > 999) - return eprint (1, "Force logout time must be between 0 and 999."); - break; - - case 'L': - if ((Larg = atoi (optarg)) < 0 || Larg > LM20_PWLEN) - return eprint (1, "Minimum password length must be between " - "0 and %d.", LM20_PWLEN); - break; - - case 'l': - if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || uopt || Sopt) - return usage (); - lopt = 1; - break; - - case 'u': - if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || lopt || Sopt) - return usage (); - uopt = 1; - break; - - case 'S': - if (xarg >= 0 || narg >= 0 || iarg >= 0 || Larg >= 0 || lopt || uopt) - return usage (); - Sopt = 1; - break; - - default: - return usage (); - } - if (Larg >= 0 || xarg >= 0 || narg >= 0 || iarg >= 0) - { - if (optind < argc) - return usage (); - return SetModals (xarg, narg, iarg, Larg); - } - - strcpy (user, optind >= argc ? getlogin () : argv[optind]); - - li = GetPW (getlogin ()); - if (! li) - return 1; - - ui = GetPW (user); - if (! ui) - return 1; - - if (lopt || uopt || Sopt) - { - if (li->usri3_priv != USER_PRIV_ADMIN) - return eprint (0, "You have no maintenance privileges."); - if (lopt) - { - if (ui->usri3_priv == USER_PRIV_ADMIN) - return eprint (0, "You may not lock an administrators account."); - ui->usri3_flags |= UF_ACCOUNTDISABLE; - } - if (uopt) - ui->usri3_flags &= ~UF_ACCOUNTDISABLE; - if (lopt || uopt) - { - ret = NetUserSetInfo (NULL, ui->usri3_name, 3, (LPBYTE) ui, NULL); - return EvalRet (ret, NULL); - } - // Sopt - PrintPW (ui); - return 0; - } - - if (li->usri3_priv != USER_PRIV_ADMIN && strcmp (getlogin (), user)) - 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 (li->usri3_priv != USER_PRIV_ADMIN) - { - strcpy (oldpwd, getpass ("Old password: ")); - if (ChangePW (user, oldpwd, oldpwd, 1)) - return 1; - } - - do - { - 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)) - ret = 1; - if (! ret && cnt < 2) - eprint (0, "Try again."); - } - while (! ret && ++cnt < 3); - return ! ret; -} diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc deleted file mode 100644 index d7d967098..000000000 --- a/winsup/utils/path.cc +++ /dev/null @@ -1,350 +0,0 @@ -/* path.cc - - Copyright 2001 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. */ - -/* The purpose of this file is to hide all the details about accessing - Cygwin's mount table. If the format or location of the mount table - changes, this is the file to change to match it. */ - -#include <windows.h> -#include <stdio.h> -#include <stdlib.h> -#include <cygwin/version.h> -#include <sys/mount.h> -#include <mntent.h> - -/* Used when treating / and \ as equivalent. */ -#define SLASH_P(ch) \ - ({ \ - char __c = (ch); \ - ((__c) == '/' || (__c) == '\\'); \ - }) - - -static struct mnt - { - const char *native; - char *posix; - unsigned flags; - int issys; - } mount_table[255]; - -struct mnt *root_here = NULL; - -static char * -find2 (HKEY rkey, unsigned *flags, char *what) -{ - char *retval = 0; - DWORD retvallen = 0; - DWORD type; - HKEY key; - - if (RegOpenKeyEx (rkey, what, 0, KEY_READ, &key) != ERROR_SUCCESS) - return 0; - - if (RegQueryValueEx (key, "native", 0, &type, 0, &retvallen) - == ERROR_SUCCESS) - { - retval = (char *) malloc (MAX_PATH + 1); - if (RegQueryValueEx (key, "native", 0, &type, (BYTE *) retval, &retvallen) - != ERROR_SUCCESS) - { - free (retval); - retval = 0; - } - } - - retvallen = sizeof (flags); - RegQueryValueEx (key, "flags", 0, &type, (BYTE *)flags, &retvallen); - - RegCloseKey (key); - - return retval; -} - -static LONG -get_cygdrive0 (HKEY key, const char *what, void *val, DWORD len) -{ - LONG status = RegQueryValueEx (key, what, 0, 0, (BYTE *)val, &len); - return status; -} - -static mnt * -get_cygdrive (HKEY key, mnt *m, int issystem) -{ - - if (get_cygdrive0 (key, CYGWIN_INFO_CYGDRIVE_FLAGS, &m->flags, - sizeof (m->flags)) != ERROR_SUCCESS) { - free (m->posix); - return m; - } - get_cygdrive0 (key, CYGWIN_INFO_CYGDRIVE_PREFIX, m->posix, MAX_PATH); - m->native = strdup ("."); - return m + 1; -} - -static void -read_mounts () -{ - DWORD posix_path_size; - int res; - struct mnt *m = mount_table; - DWORD disposition; - char buf[10000]; - - root_here = NULL; - for (mnt *m1 = mount_table; m1->posix; m1++) - { - free (m1->posix); - if (m1->native) - free ((char *) m1->native); - m1->posix = NULL; - } - - /* Loop through subkeys */ - /* FIXME: we would like to not check MAX_MOUNTS but the heap in the - shared area is currently statically allocated so we can't have an - arbitrarily large number of mounts. */ - for (int issystem = 0; issystem <= 1; issystem++) - { - sprintf (buf, "Software\\%s\\%s\\%s", - CYGWIN_INFO_CYGNUS_REGISTRY_NAME, - CYGWIN_INFO_CYGWIN_REGISTRY_NAME, - CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME); - - HKEY key = issystem ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER; - if (RegCreateKeyEx (key, buf, 0, (LPTSTR) "Cygwin", 0, KEY_READ, - 0, &key, &disposition) != ERROR_SUCCESS) - break; - for (int i = 0; ;i++, m++) - { - m->posix = (char *) malloc (MAX_PATH + 1); - posix_path_size = MAX_PATH; - /* FIXME: if maximum posix_path_size is 256, we're going to - run into problems if we ever try to store a mount point that's - over 256 but is under MAX_PATH. */ - res = RegEnumKeyEx (key, i, m->posix, &posix_path_size, NULL, - NULL, NULL, NULL); - - if (res == ERROR_NO_MORE_ITEMS) - { - m = get_cygdrive (key, m, issystem); - m->posix = NULL; - break; - } - - if (!*m->posix) - goto no_go; - else if (res != ERROR_SUCCESS) - break; - else - { - m->native = find2 (key, &m->flags, m->posix); - m->issys = issystem; - if (!m->native) - goto no_go; - } - continue; - no_go: - free (m->posix); - m->posix = NULL; - m--; - } - RegCloseKey (key); - } -} - -/* Return non-zero if PATH1 is a prefix of PATH2. - Both are assumed to be of the same path style and / vs \ usage. - Neither may be "". - LEN1 = strlen (PATH1). It's passed because often it's already known. - - Examples: - /foo/ is a prefix of /foo <-- may seem odd, but desired - /foo is a prefix of /foo/ - / is a prefix of /foo/bar - / is not a prefix of foo/bar - foo/ is a prefix foo/bar - /foo is not a prefix of /foobar -*/ - -static int -path_prefix_p (const char *path1, const char *path2, int len1) -{ - /* Handle case where PATH1 has trailing '/' and when it doesn't. */ - if (len1 > 0 && SLASH_P (path1[len1 - 1])) - len1--; - - if (len1 == 0) - return SLASH_P (path2[0]) && !SLASH_P (path2[1]); - - if (strncasecmp (path1, path2, len1) != 0) - return 0; - - return SLASH_P (path2[len1]) || path2[len1] == 0 || path1[len1 - 1] == ':'; -} - -static char * -vconcat (const char *s, va_list v) -{ - int len; - char *rv, *arg; - va_list save_v = v; - int unc; - - if (!s) - return 0; - - len = strlen (s); - - unc = SLASH_P (*s) && SLASH_P (s[1]); - - while (1) - { - arg = va_arg (v, char *); - if (arg == 0) - break; - len += strlen (arg); - } - va_end (v); - - rv = (char *) malloc (len + 1); - strcpy (rv, s); - v = save_v; - while (1) - { - arg = va_arg (v, char *); - if (arg == 0) - break; - strcat (rv, arg); - } - va_end (v); - - char *d, *p; - for (p = rv; *p; p++) - if (*p == '\\') - *p = '/'; - - /* concat is only used for urls and files, so we can safely - canonicalize the results */ - for (p = d = rv; *p; p++) - { - *d++ = *p; - /* special case for URLs */ - if (*p == ':' && p[1] == '/' && p[2] == '/' && p > rv + 1) - { - *d++ = *++p; - *d++ = *++p; - } - else if (*p == '/' || *p == '\\') - { - if (p == rv && unc) - p++; - while (p[1] == '/') - p++; - } - } - *d = 0; - - return rv; -} - -static char * -concat (const char *s, ...) -{ - va_list v; - - va_start (v, s); - - return vconcat (s, v); -} - -char * -cygpath (const char *s, ...) -{ - va_list v; - int max_len = -1; - struct mnt *m, *match = NULL; - - if (!mount_table[0].posix) - read_mounts (); - va_start (v, s); - char *path = vconcat (s, v); - if (strncmp (path, "./", 2) == 0) - memmove (path, path + 2, strlen (path + 2) + 1); - if (strncmp (path, "/./", 3) == 0) - memmove (path + 1, path + 3, strlen (path + 3) + 1); - - for (m = mount_table; m->posix ; m++) - { - if (m->flags & MOUNT_AUTO) - continue; - - int n = strlen (m->posix); - if (n < max_len || !path_prefix_p (m->posix, path, n)) - continue; - max_len = n; - match = m; - } - - char *native; - if (match == NULL) - native = strdup (path); - else if (max_len == (int) strlen (path)) - native = strdup (match->native); - else - native = concat (match->native, "/", path + max_len, NULL); - free (path); - - return native; -} - -static mnt *m = NULL; - -extern "C" FILE * -setmntent (const char *, const char *) -{ - m = mount_table; - if (!m->posix) - read_mounts (); - return NULL; -} - -extern "C" struct mntent * -getmntent (FILE *) -{ - static mntent mnt; - if (!m->posix) - return NULL; - - mnt.mnt_fsname = (char *) m->native; - mnt.mnt_dir = (char *) m->posix; - if (!mnt.mnt_type) - mnt.mnt_type = (char *) malloc (1024); - if (!mnt.mnt_opts) - mnt.mnt_opts = (char *) malloc (1024); - if (!m->issys) - strcpy (mnt.mnt_type, (char *) "user"); - else - strcpy (mnt.mnt_type, (char *) "system"); - if (!(m->flags & MOUNT_BINARY)) - strcpy (mnt.mnt_opts, (char *) "textmode"); - else - strcpy (mnt.mnt_opts, (char *) "binmode"); - if (m->flags & MOUNT_CYGWIN_EXEC) - strcat (mnt.mnt_opts, (char *) ",cygexec"); - else if (m->flags & MOUNT_EXEC) - strcat (mnt.mnt_opts, (char *) ",exec"); - if ((m->flags & MOUNT_AUTO)) /* cygdrive */ - strcat (mnt.mnt_opts, (char *) ",noumount"); - mnt.mnt_freq = 1; - mnt.mnt_passno = 1; - m++; - return &mnt; -} diff --git a/winsup/utils/path.h b/winsup/utils/path.h deleted file mode 100644 index 0512a55dd..000000000 --- a/winsup/utils/path.h +++ /dev/null @@ -1,11 +0,0 @@ -/* path.h - - Copyright 2001 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. */ - -char * cygpath (const char *s, ...); diff --git a/winsup/utils/ps.cc b/winsup/utils/ps.cc deleted file mode 100644 index c32110b43..000000000 --- a/winsup/utils/ps.cc +++ /dev/null @@ -1,325 +0,0 @@ -/* ps.cc - - Copyright 1996, 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 -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#include <stdio.h> -#include <windows.h> -#include <time.h> -#include <getopt.h> -#include <unistd.h> -#include <stdlib.h> -#include <pwd.h> -#include <sys/cygwin.h> -#include <tlhelp32.h> -#include <psapi.h> - -typedef BOOL (WINAPI *ENUMPROCESSMODULES)( - HANDLE hProcess, // handle to the process - HMODULE * lphModule, // array to receive the module handles - DWORD cb, // size of the array - LPDWORD lpcbNeeded // receives the number of bytes returned -); - -typedef DWORD (WINAPI *GETMODULEFILENAME)( - HANDLE hProcess, - HMODULE hModule, - LPTSTR lpstrFileName, - DWORD nSize -); - -typedef HANDLE (WINAPI *CREATESNAPSHOT)( - DWORD dwFlags, - DWORD th32ProcessID -); - -// Win95 functions -typedef BOOL (WINAPI *PROCESSWALK)( - HANDLE hSnapshot, - LPPROCESSENTRY32 lppe -); - -ENUMPROCESSMODULES myEnumProcessModules; -GETMODULEFILENAME myGetModuleFileNameEx; -CREATESNAPSHOT myCreateToolhelp32Snapshot; -PROCESSWALK myProcess32First; -PROCESSWALK myProcess32Next; - -static BOOL WINAPI dummyprocessmodules ( - HANDLE hProcess, // handle to the process - HMODULE * lphModule, // array to receive the module handles - DWORD cb, // size of the array - LPDWORD lpcbNeeded // receives the number of bytes returned -) -{ - lphModule[0] = (HMODULE) *lpcbNeeded; - *lpcbNeeded = 1; - return 1; -} - -static DWORD WINAPI GetModuleFileNameEx95 ( - HANDLE hProcess, - HMODULE hModule, - LPTSTR lpstrFileName, - DWORD n -) -{ - HANDLE h; - DWORD pid = (DWORD) hModule; - - h = myCreateToolhelp32Snapshot (TH32CS_SNAPPROCESS, 0); - if (!h) - return 0; - - PROCESSENTRY32 proc; - proc.dwSize = sizeof (proc); - if (myProcess32First(h, &proc)) - do - if (proc.th32ProcessID == pid) - { - CloseHandle (h); - strcpy (lpstrFileName, proc.szExeFile); - return 1; - } - while (myProcess32Next (h, &proc)); - CloseHandle (h); - return 0; -} - -int -init_win () -{ - OSVERSIONINFO os_version_info; - - memset (&os_version_info, 0, sizeof os_version_info); - os_version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - GetVersionEx (&os_version_info); - - HMODULE h; - if (os_version_info.dwPlatformId == VER_PLATFORM_WIN32_NT) - { - h = LoadLibrary ("psapi.dll"); - if (!h) - return 0; - myEnumProcessModules = (ENUMPROCESSMODULES) GetProcAddress (h, "EnumProcessModules"); - myGetModuleFileNameEx = (GETMODULEFILENAME) GetProcAddress (h, "GetModuleFileNameExA"); - if (!myEnumProcessModules || !myGetModuleFileNameEx) - return 0; - return 1; - } - - h = GetModuleHandle("KERNEL32.DLL"); - myCreateToolhelp32Snapshot = (CREATESNAPSHOT)GetProcAddress (h, "CreateToolhelp32Snapshot"); - myProcess32First = (PROCESSWALK)GetProcAddress (h, "Process32First"); - myProcess32Next = (PROCESSWALK)GetProcAddress (h, "Process32Next"); - if (!myCreateToolhelp32Snapshot || !myProcess32First || !myProcess32Next) - return 0; - - myEnumProcessModules = dummyprocessmodules; - myGetModuleFileNameEx = GetModuleFileNameEx95; - return 1; -} - -static char * -start_time (external_pinfo *child) -{ - time_t st = child->start_time; - time_t t = time (NULL); - static char stime[40] = {'\0'}; - char now[40]; - - strncpy (stime, ctime (&st) + 4, 15); - strcpy (now, ctime (&t) + 4); - - if ((t - st) < (24 * 3600)) - return (stime + 7); - - stime[6] = '\0'; - - return stime; -} - -#define FACTOR (0x19db1ded53ea710LL) -#define NSPERSEC 10000000LL - -/* Convert a Win32 time to "UNIX" format. */ -long __stdcall -to_time_t (FILETIME *ptr) -{ - /* A file time is the number of 100ns since jan 1 1601 - stuffed into two long words. - A time_t is the number of seconds since jan 1 1970. */ - - long rem; - long long x = ((long long) ptr->dwHighDateTime << 32) + ((unsigned)ptr->dwLowDateTime); - x -= FACTOR; /* number of 100ns between 1601 and 1970 */ - rem = x % ((long long)NSPERSEC); - rem += (NSPERSEC / 2); - x /= (long long) NSPERSEC; /* number of 100ns in a second */ - x += (long long) (rem / NSPERSEC); - return x; -} - -static const char * -ttynam (int ntty) -{ - static char buf[5]; - if (ntty < 0) - return " ?"; - if (ntty == TTY_CONSOLE) - return " con"; - sprintf (buf, "%4d", ntty); - return buf; -} - -int -main (int argc, char *argv[]) -{ - external_pinfo *p; - int aflag, lflag, fflag, sflag, uid; - cygwin_getinfo_types query = CW_GETPINFO; - const char *dtitle = " PID TTY STIME COMMAND\n"; - 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 %4d %8s %s\n"; - char ch; - - aflag = lflag = fflag = sflag = 0; - uid = getuid (); - lflag = 1; - - while ((ch = getopt (argc, argv, "aelfsu:W")) != -1) - switch (ch) - { - case 'a': - case 'e': - aflag = 1; - break; - case 'f': - fflag = 1; - break; - case 'l': - lflag = 1; - break; - case 's': - sflag = 1; - break; - case 'u': - uid = atoi (optarg); - if (uid == 0) - { - struct passwd *pw; - - if ((pw = getpwnam (optarg))) - uid = pw->pw_uid; - else - { - fprintf (stderr, "user %s unknown\n", optarg); - exit (1); - } - } - break; - case 'W': - query = CW_GETPINFO_FULL; - aflag = 1; - break; - - default: - fprintf (stderr, "Usage %s [-aefl] [-u uid]\n", argv[0]); - fprintf (stderr, "-f = show process uids, ppids\n"); - fprintf (stderr, "-l = show process uids, ppids, pgids, winpids\n"); - fprintf (stderr, "-u uid = list processes owned by uid\n"); - fprintf (stderr, "-a, -e = show processes of all users\n"); - fprintf (stderr, "-s = show process summary\n"); - fprintf (stderr, "-W = show windows as well as cygwin processes\n"); - exit (1); - } - - if (sflag) - printf (dtitle); - else if (fflag) - printf (ftitle); - else if (lflag) - printf (ltitle); - - (void) cygwin_internal (CW_LOCK_PINFO, 1000); - - if (query == CW_GETPINFO_FULL && !init_win ()) - query = CW_GETPINFO; - - for (int pid = 0; - (p = (external_pinfo *) cygwin_internal (query, pid | CW_NEXTPID)); - pid = p->pid) - { - if (!aflag && p->uid != uid) - continue; - char status = ' '; - if (p->process_state & PID_STOPPED) - status = 'S'; - else if (p->process_state & PID_TTYIN) - status = 'I'; - else if (p->process_state & PID_TTYOU) - status = 'O'; - - char pname[MAX_PATH]; - if (p->process_state & (PID_ZOMBIE | PID_EXITED)) - strcpy (pname, "<defunct>"); - else if (p->ppid) - { - char *s; - pname[0] = '\0'; - cygwin_conv_to_posix_path (p->progname, pname); - s = strchr (pname, '\0') - 4; - if (s > pname && strcasecmp (s, ".exe") == 0) - *s = '\0'; - } - else if (query == CW_GETPINFO_FULL) - { - HANDLE h = OpenProcess (PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, p->dwProcessId); - if (!h) - continue; - HMODULE hm[1000]; - DWORD n = p->dwProcessId; - if (!myEnumProcessModules (h, hm, sizeof (hm), &n)) - n = 0; - if (!n || !myGetModuleFileNameEx (h, hm[0], pname, MAX_PATH)) - strcpy (pname, "*** unknown ***"); - FILETIME ct, et, kt, ut; - if (GetProcessTimes (h, &ct, &et, &kt, &ut)) - p->start_time = to_time_t (&ct); - CloseHandle (h); - } - - char uname[128]; - - if (fflag) - { - struct passwd *pw; - - if ((pw = getpwuid (p->uid))) - strcpy (uname, pw->pw_name); - else - sprintf (uname, "%d", p->uid); - } - - if (sflag) - printf (dfmt, p->pid, ttynam (p->ctty), start_time (p), pname); - else if (fflag) - printf (ffmt, uname, p->pid, p->ppid, ttynam (p->ctty), start_time (p), pname); - else if (lflag) - printf (lfmt, status, p->pid, p->ppid, p->pgid, - p->dwProcessId, ttynam (p->ctty), p->uid, start_time (p), pname); - - } - (void) cygwin_internal (CW_UNLOCK_PINFO); - - return 0; -} - diff --git a/winsup/utils/regtool.cc b/winsup/utils/regtool.cc deleted file mode 100644 index 6068f3a3d..000000000 --- a/winsup/utils/regtool.cc +++ /dev/null @@ -1,573 +0,0 @@ -/* regtool.cc - - Copyright 2000 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 <ctype.h> -#include <getopt.h> -#include <windows.h> - -enum -{ - KT_AUTO, KT_INT, KT_STRING, KT_EXPAND, KT_MULTI -} key_type = KT_AUTO; - -#define LIST_KEYS 0x01 -#define LIST_VALS 0x02 -#define LIST_ALL (LIST_KEYS | LIST_VALS) - -int listwhat = 0; -int postfix = 0; -int verbose = 0; -int quiet = 0; -char **argv; - -HKEY key; -char *value; - -const char *usage_msg[] = { - "Regtool Copyright (c) 2000 Red Hat Inc", - " regtool -h - print this message", - " regtool [-v|-p|-k|-l] list [key] - list subkeys and values", - " -p=postfix, like ls -p, appends \\ postfix to key names", - " -k=keys, lists only keys", - " -l=values, lists only values", - " regtool [-v] add [key\\subkey] - add new subkey", - " regtool [-v] remove [key] - remove key", - " regtool [-v|-q] check [key] - exit 0 if key exists, 1 if not", - " regtool [-i|-s|-e|-m] set [key\\value] [data ...] - set value", - " -i=integer -s=string -e=expand-string -m=multi-string", - " regtool [-v] unset [key\\value] - removes value from key", - " regtool [-q] get [key\\value] - prints value to stdout", - " -q=quiet, no error msg, just return nonzero exit if key/value missing", - " keys are like \\prefix\\key\\key\\key\\value, where prefix is any of:", - " root HKCR HKEY_CLASSES_ROOT", - " config HKCC HKEY_CURRENT_CONFIG", - " user HKCU HKEY_CURRENT_USER", - " machine HKLM HKEY_LOCAL_MACHINE", - " users HKU HKEY_USERS", - " example: \\user\\software\\Microsoft\\Clock\\iFormat", - 0 -}; - -void -usage (void) -{ - int i; - for (i = 0; usage_msg[i]; i++) - fprintf (stderr, "%s\n", usage_msg[i]); - exit (1); -} - -void -Fail (DWORD rv) -{ - char *buf; - if (!quiet) - { - FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM, - 0, rv, 0, (CHAR *) & buf, 0, 0); - fprintf (stderr, "Error: %s\n", buf); - LocalFree (buf); - } - exit (1); -} - -struct -{ - const char *string; - HKEY key; -} wkprefixes[] = -{ - {"root", HKEY_CLASSES_ROOT}, - {"HKCR", HKEY_CLASSES_ROOT}, - {"HKEY_CLASSES_ROOT", HKEY_CLASSES_ROOT}, - {"config", HKEY_CURRENT_CONFIG}, - {"HKCC", HKEY_CURRENT_CONFIG}, - {"HKEY_CURRENT_CONFIG", HKEY_CURRENT_CONFIG}, - {"user", HKEY_CURRENT_USER}, - {"HKCU", HKEY_CURRENT_USER}, - {"HKEY_CURRENT_USER", HKEY_CURRENT_USER}, - {"machine", HKEY_LOCAL_MACHINE}, - {"HKLM", HKEY_LOCAL_MACHINE}, - {"HKEY_LOCAL_MACHINE", HKEY_LOCAL_MACHINE}, - {"users", HKEY_USERS}, - {"HKU", HKEY_USERS}, - {"HKEY_USERS", HKEY_USERS}, - {0, 0} -}; - -void -translate (char *key) -{ -#define isodigit(c) (strchr("01234567", c)) -#define tooct(c) ((c)-'0') -#define tohex(c) (strchr(_hs,tolower(c))-_hs) - static char _hs[] = "0123456789abcdef"; - - char *d = key; - char *s = key; - char c; - - while (*s) - { - if (*s == '\\') - switch (*++s) - { - case 'a': - *d++ = '\007'; - break; - case 'b': - *d++ = '\b'; - break; - case 'e': - *d++ = '\033'; - break; - case 'f': - *d++ = '\f'; - break; - case 'n': - *d++ = '\n'; - break; - case 'r': - *d++ = '\r'; - break; - case 't': - *d++ = '\t'; - break; - case 'v': - *d++ = '\v'; - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - c = tooct (*s); - if (isodigit (s[1])) - { - c = (c << 3) | tooct (*++s); - if (isodigit (s[1])) - c = (c << 3) | tooct (*++s); - } - *d++ = c; - break; - case 'x': - if (!isxdigit (s[1])) - c = '0'; - else - { - c = tohex (*++s); - if (isxdigit (s[1])) - c = (c << 4) | tohex (*++s); - } - *d++ = c; - break; - default: /* before non-special char: just add the char */ - *d++ = *s; - break; - } - else if (*s == '/') - *d++ = '\\'; - else - *d++ = *s; - ++s; - } - *d = '\0'; -} - -void -find_key (int howmanyparts, REGSAM access) -{ - char *n = argv[0], *e, c; - int i; - if (*n == '/') - translate (n); - while (*n == '\\') - n++; - for (e = n; *e && *e != '\\'; e++); - c = *e; - *e = 0; - for (i = 0; wkprefixes[i].string; i++) - if (strcmp (wkprefixes[i].string, n) == 0) - break; - if (!wkprefixes[i].string) - { - fprintf (stderr, "Unknown key prefix. Valid prefixes are:\n"); - for (i = 0; wkprefixes[i].string; i++) - fprintf (stderr, "\t%s\n", wkprefixes[i].string); - exit (1); - } - - n = e; - *e = c; - while (*n && *n == '\\') - n++; - e = n + strlen (n); - if (howmanyparts > 1) - { - while (n < e && *e != '\\') - e--; - if (*e != '\\') - { - key = wkprefixes[i].key; - value = n; - return; - } - else - { - *e = 0; - value = e + 1; - } - } - if (n[0] == 0) - { - key = wkprefixes[i].key; - return; - } - int rv = RegOpenKeyEx (wkprefixes[i].key, n, 0, access, &key); - if (rv != ERROR_SUCCESS) - Fail (rv); - //printf("key `%s' value `%s'\n", n, value); -} - - -int -cmd_list () -{ - DWORD num_subkeys, maxsubkeylen, num_values, maxvalnamelen, maxvaluelen; - DWORD maxclasslen; - char *subkey_name, *value_name, *class_name; - unsigned char *value_data, *vd; - DWORD i, j, m, n, t; - int v; - - find_key (1, KEY_READ); - RegQueryInfoKey (key, 0, 0, 0, &num_subkeys, &maxsubkeylen, &maxclasslen, - &num_values, &maxvalnamelen, &maxvaluelen, 0, 0); - - subkey_name = (char *) malloc (maxsubkeylen + 1); - class_name = (char *) malloc (maxclasslen + 1); - value_name = (char *) malloc (maxvalnamelen + 1); - value_data = (unsigned char *) malloc (maxvaluelen + 1); - - if (!listwhat) - listwhat = LIST_ALL; - - if (listwhat & LIST_KEYS) - for (i = 0; i < num_subkeys; i++) - { - m = maxsubkeylen + 1; - n = maxclasslen + 1; - RegEnumKeyEx (key, i, subkey_name, &m, 0, class_name, &n, 0); - printf ("%s%s", subkey_name, (postfix || verbose) ? "\\" : ""); - - if (verbose) - printf (" (%s)", class_name); - - puts (""); - } - - if (listwhat & LIST_VALS) - for (i = 0; i < num_values; i++) - { - m = maxvalnamelen + 1; - n = maxvaluelen + 1; - RegEnumValue (key, i, value_name, &m, 0, &t, (BYTE *) value_data, &n); - if (!verbose) - printf ("%s\n", value_name); - else - { - printf ("%s = ", value_name); - switch (t) - { - case REG_BINARY: - for (j = 0; j < 8 && j < n; j++) - printf ("%02x ", value_data[j]); - printf ("\n"); - break; - case REG_DWORD: - printf ("0x%08lx (%lu)\n", *(DWORD *) value_data, - *(DWORD *) value_data); - break; - case REG_DWORD_BIG_ENDIAN: - v = ((value_data[0] << 24) - | (value_data[1] << 16) - | (value_data[2] << 8) | (value_data[3])); - printf ("0x%08x (%d)\n", v, v); - break; - case REG_EXPAND_SZ: - case REG_SZ: - printf ("\"%s\"\n", value_data); - break; - case REG_MULTI_SZ: - vd = value_data; - while (vd && *vd) - { - printf ("\"%s\"", vd); - vd = vd + strlen ((const char *) vd) + 1; - if (*vd) - printf (", "); - } - printf ("\n"); - break; - default: - printf ("? (type %d)\n", (int) t); - } - } - } - return 0; -} - -int -cmd_add () -{ - find_key (2, KEY_ALL_ACCESS); - HKEY newkey; - DWORD newtype; - int rv = RegCreateKeyEx (key, value, 0, (char *) "", REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, 0, &newkey, &newtype); - if (rv != ERROR_SUCCESS) - Fail (rv); - - if (verbose) - { - if (newtype == REG_OPENED_EXISTING_KEY) - printf ("Key %s already exists\n", value); - else - printf ("Key %s created\n", value); - } - return 0; -} - -int -cmd_remove () -{ - find_key (2, KEY_ALL_ACCESS); - DWORD rv = RegDeleteKey (key, value); - if (rv != ERROR_SUCCESS) - Fail (rv); - if (verbose) - printf ("subkey %s deleted\n", value); - return 0; -} - -int -cmd_check () -{ - find_key (1, KEY_READ); - if (verbose) - printf ("key %s exists\n", argv[0]); - return 0; -} - -int -cmd_set () -{ - int i, n; - DWORD v, rv; - char *a = argv[1], *data; - find_key (2, KEY_ALL_ACCESS); - - if (key_type == KT_AUTO) - { - char *e; - strtoul (a, &e, 0); - if (a[0] == '%') - key_type = KT_EXPAND; - else if (a[0] && !*e) - key_type = KT_INT; - else if (argv[2]) - key_type = KT_MULTI; - else - key_type = KT_STRING; - } - - switch (key_type) - { - case KT_INT: - v = strtoul (a, 0, 0); - rv = RegSetValueEx (key, value, 0, REG_DWORD, (const BYTE *) &v, - sizeof (v)); - break; - case KT_STRING: - rv = RegSetValueEx (key, value, 0, REG_SZ, (const BYTE *) a, strlen (a)); - break; - case KT_EXPAND: - rv = RegSetValueEx (key, value, 0, REG_EXPAND_SZ, (const BYTE *) a, - strlen (a)); - break; - case KT_MULTI: - for (i = 1, n = 1; argv[i]; i++) - n += strlen (argv[i]) + 1; - data = (char *) malloc (n); - for (i = 1, n = 0; argv[i]; i++) - { - strcpy (data + n, argv[i]); - n += strlen (argv[i]) + 1; - } - data[n] = 0; - rv = RegSetValueEx (key, value, 0, REG_MULTI_SZ, (const BYTE *) data, - n + 1); - break; - case KT_AUTO: - rv = ERROR_SUCCESS; - break; - default: - rv = ERROR_INVALID_CATEGORY; - break; - } - - if (rv != ERROR_SUCCESS) - Fail (rv); - - return 0; -} - -int -cmd_unset () -{ - find_key (2, KEY_ALL_ACCESS); - DWORD rv = RegDeleteValue (key, value); - if (rv != ERROR_SUCCESS) - Fail (rv); - if (verbose) - printf ("value %s deleted\n", value); - return 0; -} - -int -cmd_get () -{ - find_key (2, KEY_READ); - DWORD vtype, dsize, rv; - char *data, *vd; - rv = RegQueryValueEx (key, value, 0, &vtype, 0, &dsize); - if (rv != ERROR_SUCCESS) - Fail (rv); - dsize++; - data = (char *) malloc (dsize); - rv = RegQueryValueEx (key, value, 0, &vtype, (BYTE *) data, &dsize); - if (rv != ERROR_SUCCESS) - Fail (rv); - switch (vtype) - { - case REG_BINARY: - fwrite (data, dsize, 0, stdout); - break; - case REG_DWORD: - printf ("%lu\n", *(DWORD *) data); - break; - case REG_SZ: - printf ("%s\n", data); - break; - case REG_EXPAND_SZ: - if (key_type == KT_EXPAND) // hack - { - char *buf; - DWORD bufsize; - bufsize = ExpandEnvironmentStrings (data, 0, 0); - buf = (char *) malloc (bufsize + 1); - ExpandEnvironmentStrings (data, buf, bufsize + 1); - data = buf; - } - printf ("%s\n", data); - break; - case REG_MULTI_SZ: - vd = data; - while (vd && *vd) - { - printf ("%s\n", vd); - vd = vd + strlen ((const char *) vd) + 1; - } - break; - } - return 0; -} - -struct -{ - const char *name; - int (*func) (); -} commands[] = -{ - {"list", cmd_list}, - {"add", cmd_add}, - {"remove", cmd_remove}, - {"check", cmd_check}, - {"set", cmd_set}, - {"unset", cmd_unset}, - {"get", cmd_get}, - {0, 0} -}; - -int -main (int argc, char **_argv) -{ - while (1) - { - int g = getopt (argc, _argv, "hvqisempkl"); - if (g == -1) - break; - switch (g) - { - case 'v': - verbose++; - break; - case 'q': - quiet++; - break; - case 'p': - postfix++; - break; - case 'k': - listwhat |= LIST_KEYS; - break; - case 'l': - listwhat |= LIST_VALS; - break; - - case 'i': - key_type = KT_INT; - break; - case 's': - key_type = KT_STRING; - break; - case 'e': - key_type = KT_EXPAND; - break; - case 'm': - key_type = KT_MULTI; - break; - - case '?': - case 'h': - usage (); - } - } - if (_argv[optind] == NULL) - usage (); - - argv = _argv + optind; - int i; - for (i = 0; commands[i].name; i++) - if (strcmp (commands[i].name, argv[0]) == 0) - { - argv++; - return commands[i].func (); - } - usage (); - - return 0; -} diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c deleted file mode 100644 index 04daba7e8..000000000 --- a/winsup/utils/setfacl.c +++ /dev/null @@ -1,495 +0,0 @@ -/* setfacl.c - - Copyright 2000, 2001 Red Hat Inc. - - Written by Corinna Vinschen <vinschen@redhat.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. */ - -#include <stdio.h> -#include <ctype.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include <getopt.h> -#include <pwd.h> -#include <grp.h> -#include <sys/types.h> -#include <sys/acl.h> - -#ifndef BOOL -#define BOOL int -#endif - -#ifndef TRUE -#define TRUE (1) -#endif - -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef ILLEGAL_MODE -#define ILLEGAL_MODE ((mode_t)0xffffffff) -#endif - -typedef enum { - NoAction, - Set, - Modify, - Delete, - ModNDel, - SetFromFile -} action_t; - -char *myname; - -mode_t getperm (char *in) -{ - if (isdigit (*in) && !in[1]) - { - int i = atoi (in); - if (i < 0 || i > 7) - return ILLEGAL_MODE; - return i << 6 | i << 3 | i; - } - if (strlen (in) > 3 && strchr (" \t\n\r#", in[3])) - in[3] = '\0'; - if (strlen (in) != 3) - return ILLEGAL_MODE; - if (!strchr ("r-", in[0]) - || !strchr ("w-", in[1]) - || !strchr ("x-", in[2])) - return ILLEGAL_MODE; - return (in[0] == 'r' ? S_IRUSR | S_IRGRP | S_IROTH : 0) - | (in[1] == 'w' ? S_IWUSR | S_IWGRP | S_IWOTH : 0) - | (in[2] == 'x' ? S_IXUSR | S_IXGRP | S_IXOTH : 0); -} - -BOOL -getaclentry (action_t action, char *c, aclent_t *ace) -{ - char *c2; - - ace->a_type = 0; - ace->a_id = 0; - ace->a_perm = 0; - - if (!strncmp (c, "default:", 8) - || !strncmp (c, "d:", 2)) - { - ace->a_type = ACL_DEFAULT; - c = strchr (c, ':') + 1; - } - if (!strncmp (c, "user:", 5) - || !strncmp (c, "u:", 2)) - { - ace->a_type |= USER_OBJ; - c = strchr (c, ':') + 1; - } - else if (!strncmp (c, "group:", 6) - || !strncmp (c, "g:", 2)) - { - ace->a_type |= GROUP_OBJ; - c = strchr (c, ':') + 1; - } - else if (!strncmp (c, "mask:", 5) - || !strncmp (c, "m:", 2)) - { - ace->a_type |= CLASS_OBJ; - c = strchr (c, ':') + 1; - } - else if (!strncmp (c, "other:", 6) - || !strncmp (c, "o:", 2)) - { - ace->a_type |= OTHER_OBJ; - c = strchr (c, ':') + 1; - } - else - return FALSE; - if (ace->a_type & (USER_OBJ | GROUP_OBJ)) - { - if ((c2 = strchr (c, ':'))) - { - if (action == Delete) - return FALSE; - *c2 = '\0'; - } - else if (action != Delete) - return FALSE; - if (c2 == c) - { - if (action == Delete) - return FALSE; - } - else if (isdigit (*c)) - { - char *c3; - - ace->a_id = strtol (c, &c3, 10); - if (*c3) - return FALSE; - } - else if (ace->a_type & USER_OBJ) - { - struct passwd *pw = getpwnam (c); - if (!pw) - return FALSE; - ace->a_id = pw->pw_uid; - } - else - { - struct group *gr = getgrnam (c); - if (!gr) - return FALSE; - ace->a_id = gr->gr_gid; - } - if (c2 != c) - { - if (ace->a_type & USER_OBJ) - { - ace->a_type &= ~USER_OBJ; - ace->a_type |= USER; - } - else - { - ace->a_type &= ~GROUP_OBJ; - ace->a_type |= GROUP; - } - } - if (c2) - c = c2 + 1; - } - else if (*c++ != ':') - return FALSE; - if (action == Delete) - { - if ((ace->a_type & (CLASS_OBJ | OTHER_OBJ)) - && *c) - return FALSE; - ace->a_perm = ILLEGAL_MODE; - return TRUE; - } - if ((ace->a_perm = getperm (c)) == ILLEGAL_MODE) - return FALSE; - return TRUE; -} - -BOOL -getaclentries (action_t action, char *buf, aclent_t *acls, int *idx) -{ - char *c; - - if (action == SetFromFile) - { - FILE *fp; - char fbuf[256], *fb; - - if (!strcmp (buf, "-")) - fp = stdin; - else if (! (fp = fopen (buf, "r"))) - return FALSE; - while ((fb = fgets (fbuf, 256, fp))) - { - while (strchr (" \t", *fb)) - ++fb; - if (strchr ("\n\r#", *fb)) - continue; - if (!getaclentry (action, fb, acls + (*idx)++)) - { - fclose (fp); - return FALSE; - } - } - if (fp != stdin) - fclose (fp); - } - else - for (c = strtok (buf, ","); c; c = strtok (NULL, ",")) - if (!getaclentry (action, c, acls + (*idx)++)) - return FALSE; - return TRUE; -} - -int -searchace (aclent_t *aclp, int nentries, int type, int id) -{ - int i; - - for (i = 0; i < nentries; ++i) - if ((aclp[i].a_type == type && (id < 0 || aclp[i].a_id == id)) - || !aclp[i].a_type) - return i; - return -1; -} - -int -modacl (aclent_t *tgt, int tcnt, aclent_t *src, int scnt) -{ - int t, s, i; - - 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; - } - } - else - { - tgt[t] = src[s]; - if (t >= tcnt) - ++tcnt; - } - } - return tcnt; -} - -void -setfacl (action_t action, char *path, aclent_t *acls, int cnt) -{ - aclent_t lacl[MAX_ACL_ENTRIES]; - int lcnt; - - memset (lacl, 0, sizeof lacl); - if (action == Set) - { - if (acl (path, SETACL, cnt, acls)) - perror (myname); - return; - } - 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 (myname); -} - -#define pn(txt) fprintf (fp, txt "\n", myname) -#define p(txt) fprintf (fp, txt "\n") - -int -usage (int help) -{ - FILE *fp = help ? stdout : stderr; - - pn ("usage: %s [-r] -s acl_entries file..."); - pn (" %s [-r] -md acl_entries file..."); - pn (" %s [-r] -f acl_file file..."); - if (!help) - pn ("Try `%s --help' for more information."); - else - { - p (""); - p ("Modify file and directory access control lists (ACLs)"); - p (""); - pn ("For each file given as parameter, %s will either replace its"); - p ("complete ACL (-s, -f)), or it will add, modify, or delete ACL"); - p ("entries."); - p (""); - p ("The following options are supported:"); - p (""); - p ("-s Substitute the ACL of the file by the entries specified on"); - p (" the command line. Required entries are"); - p (" - One user entry for the owner of the file."); - p (" - One group entry for the group of the file."); - p (" - One other entry."); - p (" If additional user and group entries are given:"); - p (" - A mask entry for the file group class of the file."); - p (" - No duplicate user or group entries with the same uid/gid."); - p (" If it is a directory:"); - p (" - One default user entry for the owner of the file."); - p (" - One default group entry for the group of the file."); - p (" - One default mask entry for the file group class of the file."); - p (" - One default other entry."); - p (""); - p (" Acl_entries are one or more comma-separated ACL entries from"); - p (" the following list:"); - p (""); - p (" u[ser]::perm"); - p (" u[ser]:uid:perm"); - p (" g[roup]::perm"); - p (" g[roup]:gid:perm"); - p (" m[ask]::perm"); - p (" o[ther]::perm"); - p (""); - p (" Default entries are like the above with the trailing default"); - p (" identifier. E.g."); - p (""); - p (" d[efault]:u[ser]:uid:perm"); - p (""); - p (" `perm' is either a 3-char permissions string in the form"); - p (" \"rwx\" with the character - for not setting a permission"); - p (" or it is the octal representation of the permissions, a"); - p (" value from 0 (equivalent to \"---\") to 7 (\"rwx\")."); - p (" `uid' is a user name or a numerical uid."); - p (" `gid' is a group name or a numerical gid."); - p (""); - p ("-f Like -s but take the ACL entries from `acl_file'. Acl_entries"); - p (" are given one per line. Whitespace characters are ignored,"); - p (" the character \"#\" may be used to start a comment. The"); - p (" special filename \"-\" indicates reading from stdin."); - p (""); - p ("-m Add or modify one or more specified ACL entries. Acl_entries"); - p (" is a comma-separated list of entries from the same list as"); - p (" above."); - p (""); - p ("-d Delete one or more specified entries from the file's ACL."); - p (" The owner, group and others entries must not be deleted"); - p (" Acl_entries are one or more comma-separated ACL entries"); - p (" without permissions, taken from the following list:"); - p (""); - p (" u[ser]:uid"); - p (" g[roup]:gid"); - p (" d[efault]:u[ser]:uid"); - p (" d[efault]:g[roup]:gid"); - p (" d[efault]:m[ask]:"); - p (" d[efault]:o[ther]:"); - p (""); - p ("-r Causes the permissions specified in the mask entry to be"); - p (" ignored and replaced by the maximum permissions needed for"); - p (" the file group class."); - p (""); - p ("While the -m and -d options may be used in the same command, the"); - p ("-s and -f options may be used only exclusively."); - p (""); - p ("Directories may contain default ACL entries. Files created"); - p ("in a directory that contains default ACL entries will have"); - p ("permissions according to the combination of the current umask,"); - p ("the explicit permissions requested and the default ACL entries"); - p ("Note: Under Cygwin, the default ACL entries are not taken into"); - p ("account currently."); - } - return 1; -} - -struct option longopts[] = { - {"help", no_argument, NULL, 'h'}, - {0, no_argument, NULL, 0} -}; - -int -main (int argc, char **argv) -{ - extern char *optarg; - extern int optind; - int c; - action_t action = NoAction; - int ropt = 0; - aclent_t acls[MAX_ACL_ENTRIES]; - int aclidx = 0; - - myname = argv[0]; - memset (acls, 0, sizeof acls); - while ((c = getopt_long (argc, argv, "d:f:m:rs:", longopts, NULL)) != EOF) - switch (c) - { - case 'd': - if (action == NoAction) - action = Delete; - else if (action == Modify) - action = ModNDel; - else - return usage (0); - if (! getaclentries (Delete, optarg, acls, &aclidx)) - { - fprintf (stderr, "%s: illegal acl entries\n", myname); - return 2; - } - break; - case 'f': - if (action == NoAction) - action = Set; - else - return usage (0); - if (! getaclentries (SetFromFile, optarg, acls, &aclidx)) - { - fprintf (stderr, "%s: illegal acl entries\n", myname); - return 2; - } - break; - case 'm': - if (action == NoAction) - action = Modify; - else if (action == Delete) - action = ModNDel; - else - return usage (0); - if (! getaclentries (Modify, optarg, acls, &aclidx)) - { - fprintf (stderr, "%s: illegal acl entries\n", myname); - return 2; - } - break; - case 'r': - if (!ropt) - ropt = 1; - else - return usage (0); - break; - case 's': - if (action == NoAction) - action = Set; - else - return usage (0); - break; - if (! getaclentries (Set, optarg, acls, &aclidx)) - { - fprintf (stderr, "%s: illegal acl entries\n", myname); - return 2; - } - break; - case 'h': - return usage (1); - default: - return usage (0); - } - if (action == NoAction) - return usage (0); - if (optind > argc - 1) - return usage (0); - if (action == Set) - switch (aclcheck (acls, aclidx, NULL)) - { - case GRP_ERROR: - fprintf (stderr, "%s: more than one group entry.\n", myname); - return 2; - case USER_ERROR: - fprintf (stderr, "%s: more than one user entry.\n", myname); - return 2; - case CLASS_ERROR: - fprintf (stderr, "%s: more than one mask entry.\n", myname); - return 2; - case OTHER_ERROR: - fprintf (stderr, "%s: more than one other entry.\n", myname); - return 2; - case DUPLICATE_ERROR: - fprintf (stderr, "%s: duplicate additional user or group.\n", myname); - return 2; - case ENTRY_ERROR: - fprintf (stderr, "%s: invalid entry type.\n", myname); - return 2; - case MISS_ERROR: - fprintf (stderr, "%s: missing entries.\n", myname); - return 2; - case MEM_ERROR: - fprintf (stderr, "%s: out of memory.\n", myname); - return 2; - default: - break; - } - for (c = optind; c < argc; ++c) - setfacl (action, argv[c], acls, aclidx); - return 0; -} diff --git a/winsup/utils/ssp.c b/winsup/utils/ssp.c deleted file mode 100644 index 49550859f..000000000 --- a/winsup/utils/ssp.c +++ /dev/null @@ -1,802 +0,0 @@ -/* - * Copyright (c) 2000, 2001, 2002 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 - * (at your option) any later version. - * - * A copy of the GNU General Public License can be found at - * http://www.gnu.org/ - * - * Written by DJ Delorie <dj@redhat.com> - * - */ - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <fcntl.h> -#include <time.h> -#include <ctype.h> -#include <windows.h> - -#ifdef __GNUC__ -const char *help_text = "\ -Usage: ssp [options] low_pc high_pc command...\n\ -\n\ -The SSP is a `single-step profiler' - it uses the debug API to\n\ -single-step your program, noting *everything* your program runs, not\n\ -just random places hit by random timer interrupts. You must specify\n\ -the range of EIP values to profile. For example, you could profile\n\ -just a function, or just a line of code, or the whole thing.\n\ -Use \"objdump -h\" to find the start of .text and the section following\n\ -it; this is what you want.\n\ -\n\ -There are many options to ssp. Since step-profiling makes your\n\ -program run about 1,000 times slower than normal, it's best to\n\ -understand all the options so that you can narrow down the parts\n\ -of your program you need to single-step.\n\ -\n\ --v = verbose messages about debug events.\n\ -\n\ --d, -e = disable/enable single-stepping by default. Use\n\ -OutputDebugString (\"ssp on\") to enable stepping, or \"ssp off\" to\n\ -disable it. Thus, you can profile a single function call or block.\n\ -\n\ --t = trace every EIP value to a file TRACE.SSP. This gets big *fast*.\n\ -Use \"addr2line -C -f -s -e foo.exe < trace.ssp > lines.ssp\" and then\n\ -\"perl cvttrace\" to convert to symbolic traces.\n\ -\n\ --tc = trace every EIP value to the console. *Lots* slower.\n\ -\n\ --s = trace sub-threads too. Dangerous if you have race conditions.\n\ -\n\ --dll = enable dll profiling. A chart of relative DLL usage is\n\ -produced after the run.\n\ -\n\ -Examples:\n\ - ssp 0x401000 0x403000 hello.exe\n\ - ssp -v -d -dll 0x401000 0x440000 foo.exe\n\ -\n\ -The output is a file \"gmon.out\" that can be read with gprof:\n\ - gprof -b foo.exe\n\ -\n\ -See ssp.txt in the cygwin sources for more information.\n\ -"; -#else -char *help_text = "Usage: get cygwin!\n"; -#endif - -#define KERNEL_ADDR 0x77000000 - -#define TRACE_SSP 0 - -#define VERBOSE 1 -#define TIMES 1000 - -/* from winsup/gmon.h */ -struct gmonhdr { - unsigned long lpc; /* base pc address of sample buffer */ - unsigned long 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 */ -}; -#define GMONVERSION 0x00051879 -#define HISTCOUNTER unsigned short - -typedef struct { - unsigned int base_address; - int pcount; - int scount; - char *name; -} DllInfo; - -typedef struct { - unsigned int address; - unsigned char real_byte; -} PendingBreakpoints; - -int low_pc=0, high_pc=0; -unsigned int last_pc=0, pc, last_sp=0, sp; -int total_cycles, count; -char *cmd_line; -HANDLE hProcess; -PROCESS_INFORMATION procinfo; -STARTUPINFO startup; -CONTEXT context; -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; -int tracing_enabled = 0; -int trace_console = 0; -int trace_all_threads = 0; -int dll_counts = 0; -int verbose = 0; - -#define MAXTHREADS 100 -int active_thread_ids[MAXTHREADS]; -HANDLE active_threads[MAXTHREADS]; -int thread_step_flags[MAXTHREADS]; -int thread_return_address[MAXTHREADS]; -int num_active_threads = 0; -int suspended_count=0; - -#define MAXDLLS 100 -DllInfo dll_info[MAXDLLS]; -int num_dlls=0; - -#define MAXPENDS 100 -PendingBreakpoints pending_breakpoints[MAXPENDS]; -int num_breakpoints=0; - -static void -add_breakpoint (unsigned int address) -{ - int i; - DWORD rv; - static char int3[] = { 0xcc }; - for (i=0; i<num_breakpoints; i++) - { - if (pending_breakpoints[i].address == address) - return; - if (pending_breakpoints[i].address == 0) - break; - } - if (i == MAXPENDS) - return; - pending_breakpoints[i].address = address; - ReadProcessMemory (hProcess, - (void *)address, - &(pending_breakpoints[i].real_byte), - 1, &rv); - - WriteProcessMemory (hProcess, - (void *)address, - (LPVOID)int3, 1, &rv); - if (i >= num_breakpoints) - num_breakpoints = i+1; -} - -static int -remove_breakpoint (unsigned int address) -{ - int i; - DWORD 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); - return 1; - } - } - return 0; -} - -static HANDLE -lookup_thread_id (int threadId, int *tix) -{ - int i; - for (i=0; i<num_active_threads; i++) - if (active_thread_ids[i] == threadId) - { - if (tix) *tix = i; - return active_threads[i]; - } - return 0; -} - -static void -set_step_threads (int threadId, int trace) -{ - int rv, tix; - HANDLE thread = lookup_thread_id (threadId, &tix); - - rv = GetThreadContext (thread, &context); - if (rv != -1) - { - thread_step_flags[tix] = trace; - if (trace) - context.EFlags |= 0x100; /* TRAP (single step) flag */ - else - context.EFlags &= ~0x100; /* TRAP (single step) flag */ - SetThreadContext (thread, &context); - } -} - -static void -set_steps () -{ - int i, s; - for (i=0; i<num_active_threads; i++) - { - GetThreadContext (active_threads[i], &context); - s = context.EFlags & 0x0100; - if (!s && thread_step_flags[i]) - { - set_step_threads (active_thread_ids[i], 1); - } - } -} - -static int -dll_sort (const void *va, const void *vb) -{ - DllInfo *a = (DllInfo *)va; - DllInfo *b = (DllInfo *)vb; - if (a->base_address < b->base_address) - return -1; - return 1; -} - -static char * -addr2dllname (unsigned int addr) -{ - int i; - for (i=num_dlls-1; i>=0; i--) - { - if (dll_info[i].base_address < addr) - { - return dll_info[i].name; - } - } - return (char *)""; -} - -static void -dump_registers (HANDLE thread) -{ - context.ContextFlags = CONTEXT_FULL; - GetThreadContext (thread, &context); - 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); -} - -typedef struct Edge { - struct Edge *next; - unsigned int from_pc; - unsigned int to_pc; - unsigned int count; -} Edge; - -Edge *edges[4096]; - -void -store_call_edge (unsigned int from_pc, unsigned int 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) - 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->count++; -} - -void -write_call_edges (FILE *f) -{ - int h; - 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); -} - -char * -wide_strdup (char *cp) -{ - unsigned short *s = (unsigned short *)cp; - int len; - char *rv; - for (len=0; s[len]; len++); - rv = (char *)malloc (len+1); - for (len=0; s[len]; len++) - rv[len] = s[len]; - rv[len] = 0; - return rv; -} - -void -run_program (char *cmdline) -{ - FILE *tracefile = 0; - int tix, i; - HANDLE hThread; - char *string; - - memset (&startup, 0, sizeof (startup)); - startup.cb = sizeof (startup); - - if (!CreateProcess (0, cmd_line, 0, 0, 0, - CREATE_NEW_PROCESS_GROUP - | CREATE_SUSPENDED - | DEBUG_PROCESS - | DEBUG_ONLY_THIS_PROCESS, - 0, 0, &startup, &procinfo)) - { - fprintf (stderr, "Can't create process: error %ld\n", GetLastError ()); - exit (1); - } - - hProcess = procinfo.hProcess; -#if 0 - printf ("procinfo: %08x %08x %08x %08x\n", - hProcess, procinfo.hThread, procinfo.dwProcessId, procinfo.dwThreadId); -#endif - - active_threads[0] = procinfo.hThread; - active_thread_ids[0] = procinfo.dwThreadId; - thread_step_flags[0] = stepping_enabled; - num_active_threads = 1; - - dll_info[0].base_address = 0; - dll_info[0].pcount = 0; - dll_info[0].scount = 0; - dll_info[0].name = cmd_line; - num_dlls = 1; - - SetThreadPriority (procinfo.hThread, THREAD_PRIORITY_IDLE); - - context.ContextFlags = CONTEXT_FULL; - - ResumeThread (procinfo.hThread); - - total_cycles = 0; - - if (tracing_enabled) - { - tracefile = fopen ("trace.ssp", "w"); - if (!tracefile) - { - tracing_enabled = 0; - perror ("trace.ssp"); - } - } - - running = 1; - while (running) - { - int src, dest; - DWORD rv; - DEBUG_EVENT event; - int contv = DBG_CONTINUE; - - event.dwDebugEventCode = -1; - if (!WaitForDebugEvent (&event, INFINITE)) - { - printf ("idle...\n"); - } - - hThread = lookup_thread_id (event.dwThreadId, &tix); - -#if 0 - printf ("DE: %x/%d %d %d ", - hThread, tix, - 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 ("\n"); -#endif - - switch (event.dwDebugEventCode) - { - - case CREATE_PROCESS_DEBUG_EVENT: - break; - - 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)); - - active_thread_ids[num_active_threads] = event.dwThreadId; - active_threads[num_active_threads] = event.u.CreateThread.hThread; - thread_return_address[num_active_threads] = 0; - num_active_threads++; - - if (trace_all_threads && stepping_enabled) - { - thread_step_flags[num_active_threads-1] = stepping_enabled; - add_breakpoint ((int)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); - - for (src=0, dest=0; src<num_active_threads; src++) - if (active_thread_ids[src] != event.dwThreadId) - { - active_thread_ids[dest] = active_thread_ids[src]; - active_threads[dest] = active_threads[src]; - dest++; - } - num_active_threads = dest; - break; - - case EXCEPTION_DEBUG_EVENT: - rv = GetThreadContext (hThread, &context); - switch (event.u.Exception.ExceptionRecord.ExceptionCode) - { - case STATUS_BREAKPOINT: - if (remove_breakpoint ((int)event.u.Exception.ExceptionRecord.ExceptionAddress)) - { - context.Eip --; - if (rv != -1) - SetThreadContext (hThread, &context); - if (ReadProcessMemory (hProcess, (void *)context.Esp, &rv, 4, &rv)) - thread_return_address[tix] = rv; - } - set_step_threads (event.dwThreadId, stepping_enabled); - case STATUS_SINGLE_STEP: - opcode_count++; - pc = (unsigned int)event.u.Exception.ExceptionRecord.ExceptionAddress; - sp = (unsigned int)context.Esp; - if (tracing_enabled) - fprintf (tracefile, "%08x %08lx\n", pc, event.dwThreadId); - if (trace_console) - { - printf ("%d %08x\n", tix, pc); - fflush (stdout); - } - - if (dll_counts) - { - int i; - for (i=num_dlls-1; i>=0; i--) - { - if (dll_info[i].base_address < context.Eip) - { - if (hThread == procinfo.hThread) - dll_info[i].pcount++; - else - dll_info[i].scount++; - break; - } - } - } - - if (pc < last_pc || pc > last_pc+10) - { - static int ncalls=0; - static int qq=0; - if (++qq % 100 == 0) - fprintf (stderr, " %08x %d %d \r", - pc, ncalls, opcode_count); - - if (sp == last_sp-4) - { - ncalls++; - store_call_edge (last_pc, pc); - if (last_pc < KERNEL_ADDR && pc > KERNEL_ADDR) - { - int retaddr; - DWORD rv; - ReadProcessMemory (hProcess, - (void *)sp, - (LPVOID)&(retaddr), - 4, &rv); -#if 0 - printf ("call last_pc = %08x pc = %08x rv = %08x\n", - last_pc, pc, retaddr); - /* experimental - try to skip kernel calls for speed */ - add_breakpoint (retaddr); - set_step_threads (event.dwThreadId, 0); -#endif - } - } - } - - total_cycles++; - last_sp = sp; - last_pc = pc; - if (pc >= low_pc && pc < high_pc) - hits[(pc - low_pc)/2] ++; - break; - 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); - if (event.u.Exception.dwFirstChance == 1) - dump_registers (hThread); - } - contv = DBG_EXCEPTION_NOT_HANDLED; - running = 0; - break; - } - - if (rv != -1) - { - if (pc == thread_return_address[tix]) - { - if (context.EFlags & 0x100) - { - context.EFlags &= ~0x100; /* TRAP (single step) flag */ - SetThreadContext (hThread, &context); - } - } - else if (stepping_enabled) - { - if (!(context.EFlags & 0x100)) - { - context.EFlags |= 0x100; /* TRAP (single step) flag */ - SetThreadContext (hThread, &context); - } - } - } - break; - - case OUTPUT_DEBUG_STRING_EVENT: - string = (char *)malloc (event.u.DebugString.nDebugStringLength+1); - i = ReadProcessMemory (hProcess, - event.u.DebugString.lpDebugStringData, - (LPVOID)string, - event.u.DebugString.nDebugStringLength, - &rv); - if (!i) - { - printf ("error reading memory: %ld %ld\n", rv, GetLastError ()); - } - if (verbose) - printf ("ODS: %x/%d \"%s\"\n", - (int)hThread, tix, string); - - if (strcmp (string, "ssp on") == 0) - { - stepping_enabled = 1; - set_step_threads (event.dwThreadId, 1); - } - - if (strcmp (string, "ssp off") == 0) - { - stepping_enabled = 0; - set_step_threads (event.dwThreadId, 0); - } - - break; - - - case LOAD_DLL_DEBUG_EVENT: - if (verbose) - printf ("load dll %08x:", - (int)event.u.LoadDll.lpBaseOfDll); - - dll_ptr = (char *)"( u n k n o w n ) \0\0"; - if (event.u.LoadDll.lpImageName) - { - ReadProcessMemory (hProcess, - event.u.LoadDll.lpImageName, - (LPVOID)&src, - sizeof (src), - &rv); - if (src) - { - ReadProcessMemory (hProcess, - (void *)src, - (LPVOID)dll_name, - sizeof (dll_name), - &rv); - dll_name[rv] = 0; - dll_ptr = dll_name; - for (cp=dll_name; *cp; cp++) - { - if (*cp == '\\' || *cp == '/') - { - dll_ptr = cp+1; - } - *cp = tolower (*cp); - } - } - } - - - dll_info[num_dlls].base_address - = (unsigned int)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); - if (verbose) - printf (" %s\n", dll_info[num_dlls].name); - num_dlls++; - qsort (dll_info, num_dlls, sizeof (DllInfo), dll_sort); - - break; - - case UNLOAD_DLL_DEBUG_EVENT: - if (verbose) - printf ("unload dll\n"); - break; - - case EXIT_PROCESS_DEBUG_EVENT: - if (verbose) - printf ("process %08lx %08lx exit %ld\n", - event.dwProcessId, event.dwThreadId, - event.u.ExitProcess.dwExitCode); - - running = 0; - break; - } - - set_steps (); - ContinueDebugEvent (event.dwProcessId, event.dwThreadId, contv); - } - - count = 0; - for (pc=low_pc; pc<high_pc; pc+=2) - { - count += hits[(pc - low_pc)/2]; - } - printf ("total cycles: %d, counted cycles: %d\n", total_cycles, count); - - if (tracing_enabled) - fclose (tracefile); - -} - -#define WHITE(s) while (isspace (*s)) s++ - -int -main (int argc, char **argv) -{ - int i, n; - int total_pcount, total_scount; - FILE *gmon; - - setbuf (stdout, 0); - - cmd_line = GetCommandLine (); - - /* strip off the program part */ - n = sscanf (cmd_line, "%*s%n", &i); - cmd_line += i; - WHITE (cmd_line); - - /* parse arguments. Ugly, but we need to preserve the tail of the line */ - while (*cmd_line == '-') - { - char opt[100]; - n = sscanf (cmd_line, " %s%n", opt, &i); - cmd_line += i; - WHITE (cmd_line); - - if (strcmp (opt, "-d") == 0) - { - printf ("stepping disabled; enable via OutputDebugString (\"ssp on\")\n"); - stepping_enabled = 0; - } - if (strcmp (opt, "-e") == 0) - { - printf ("stepping enabled; disable via OutputDebugString (\"ssp off\")\n"); - stepping_enabled = 1; - } - if (strcmp (opt, "-t") == 0) - { - printf ("tracing all $eip to trace.ssp\n"); - tracing_enabled = 1; - } - if (strcmp (opt, "-tc") == 0) - { - printf ("tracing *all* $eip to the console\n"); - trace_console = 1; - } - if (strcmp (opt, "-s") == 0) - { - printf ("tracing all sub-threads too, not just the main one\n"); - trace_all_threads = 1; - } - if (strcmp (opt, "-dll") == 0) - { - printf ("profiling dll usage\n"); - dll_counts = 1; - } - if (strcmp (opt, "-v") == 0) - { - printf ("verbose messages enabled\n"); - verbose = 1; - } - } - - n = sscanf (cmd_line, " %i %i %n", &low_pc, &high_pc, &i); - if (n < 2) - { - fputs (help_text, stderr); - exit (1); - } - cmd_line += i; - - if (low_pc > high_pc-8) - { - 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); - - fprintf (stderr, "prun: [%08x,%08x] Running `%s'\n", - low_pc, high_pc, cmd_line); - - run_program (cmd_line); - - hdr.lpc = low_pc; - hdr.hpc = high_pc; - hdr.ncnt = high_pc-low_pc + 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); - write_call_edges (gmon); - fclose (gmon); - - if (dll_counts) - { - /* 1234567 123% 1234567 123% 12345678 xxxxxxxxxxx */ - printf (" Main-Thread Other-Thread BaseAddr DLL Name\n"); - - total_pcount = 0; - total_scount = 0; - for (i=0; i<num_dlls; i++) - { - total_pcount += dll_info[i].pcount; - total_scount += dll_info[i].scount; - } - - if (total_pcount == 0) total_pcount++; - if (total_scount == 0) total_scount++; - - for (i=0; i<num_dlls; i++) - if (dll_info[i].pcount || dll_info[i].scount) - { - printf ("%7d %3d%% %7d %3d%% %08x %s\n", - dll_info[i].pcount, - (dll_info[i].pcount*100)/opcode_count, - dll_info[i].scount, - (dll_info[i].scount*100)/opcode_count, - dll_info[i].base_address, - dll_info[i].name); - } - } - - exit (0); -} - diff --git a/winsup/utils/ssp.txt b/winsup/utils/ssp.txt deleted file mode 100644 index e73880e90..000000000 --- a/winsup/utils/ssp.txt +++ /dev/null @@ -1,125 +0,0 @@ - -SSP - The Single Step Profiler - -Original Author: DJ Delorie <dj@redhat.com> - -The SSP is a program that uses the Win32 debug API to run a program -one ASM instruction at a time. It records the location of each -instruction used, how many times that instruction is used, and all -function calls. The results are saved in a format that is usable by -the profiling program "gprof", although gprof will claim the values -are seconds, they really are instruction counts. More on that later. - -Because the SSP was originally designed to profile the cygwin DLL, it -does not automatically select a block of code to report statistics on. -You must specify the range of memory addresses to keep track of -manually, but it's not hard to figure out what to specify. Use the -"objdump" program to determine the bounds of the target's ".text" -section. Let's say we're profiling cygwin1.dll. Make sure you've -built it with debug symbols (else gprof won't run) and run objdump -like this: - - objdump -h cygwin1.dll - -It will print a report like this: - -cygwin1.dll: file format pei-i386 - -Sections: -Idx Name Size VMA LMA File off Algn - 0 .text 0007ea00 61001000 61001000 00000400 2**2 - CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA - 1 .data 00008000 61080000 61080000 0007ee00 2**2 - CONTENTS, ALLOC, LOAD, DATA - . . . - -The only information we're concerned with are the VMA of the .text -section and the VMA of the section after it (sections are usually -contiguous; you can also add the Size to the VMA to get the end -address). In this case, the VMA is 0x61001000 and the ending address -is either 0x61080000 (start of .data method) or 0x0x6107fa00 (VMA+Size -method). - -There are two basic ways to use SSP - either profiling a whole -program, or selectively profiling parts of the program. - -To profile a whole program, just run ssp without options. By default, -it will step the whole program. Here's a simple example, using the -numbers above: - - ssp 0x61001000 0x61080000 hello.exe - -This will step the whole program. It will take at least 8 minutes on -a PII/300 (yes, really). When it's done, it will create a file called -"gmon.out". You can turn this data file into a readable report with -gprof: - - gprof -b cygwin1.dll - -The "-b" means "skip the help pages". You can omit this until you're -familiar with the report layout. The gprof documentation explains -a lot about this report, but ssp changes a few things. For example, -the first part of the report reports the amount of time spent in each -function, like this: - -Each sample counts as 0.01 seconds. - % cumulative self self total - time seconds seconds calls ms/call ms/call name - 10.02 231.22 72.43 46 1574.57 1574.57 strcspn - 7.95 288.70 57.48 130 442.15 442.15 strncasematch - -The "seconds" columns are really CPU opcodes, 1/100 second per opcode. -So, "231.22" above means 23,122 opcodes. The ms/call values are 10x -too big; 1574.57 means 157.457 opcodes per call. Similar adjustments -need to be made for the "self" and "children" columns in the second -part of the report. - -OK, so now we've got a huge report that took a long time to generate, -and we've identified a spot we want to work on optimizing. Let's say -it's the time() function. We can use SSP to selectively profile this -function by using OutputDebugString() to control SSP from within the -program. Here's a sample program: - - #include <windows.h> - main() - { - time_t t; - OutputDebugString("ssp on"); - time(&t); - OutputDebugString("ssp off"); - } - -Then, add the "-d" option to ssp to default to *disabling* profiling. -The program will run at full speed until the first OutputDebugString, -then step until the second. - - ssp -d 0x61001000 0x61080000 hello.exe - -You can then use gprof (as usual) to see the performance profile for -just that portion of the program's execution. - -OK, now for the other ssp options, and when to use them: - -"-v" - verbose. This prints messages about threads starting and -stopping, OutputDebugString calls, DLLs loading, etc. - -"-t" and "-tc" - tracing. With -t, *every* step's address is written -to the file "trace.ssp". This can be used to help debug functions, -since it can trace multiple threads. Clever use of scripts can match -addresses with disassembled opcodes if needed. Warning: creates -*huge* files, very quickly. "-tc" prints each address to the console, -useful for debugging key chunks of assembler. - -"-s" - subthreads. Usually, you only need to trace the main thread, -but sometimes you need to trace all threads, so this enables that. -It's also needed when you want to profile a function that only a -subthread calls. However, using OutputDebugString automatically -enables profiling on the thread that called it, not the main thread. - -"-dll" - dll profiling. Generates a pretty table of how much time was -spent in each dll the program used. No sense optimizing a function in -your program if most of the time is spent in the DLL. - -I usually use the -v, -s, and -dll options: - - ssp -v -s -dll -d 0x61001000 0x61080000 hello.exe diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc deleted file mode 100644 index d29d3e49b..000000000 --- a/winsup/utils/strace.cc +++ /dev/null @@ -1,947 +0,0 @@ -/* strace.cc - - Copyright 2000, 2001, 2002 Red Hat Inc. - - Written by Chris Faylor <cgf@redhat.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. */ - -#define cygwin_internal cygwin_internal_dontuse -#include <stdio.h> -#include <fcntl.h> -#include <getopt.h> -#include <stdarg.h> -#include <string.h> -#include <stdlib.h> -#include <time.h> -#include <windows.h> -#include <signal.h> -#include <errno.h> -#include "cygwin/include/sys/strace.h" -#include "cygwin/include/sys/cygwin.h" -#undef cygwin_internal - -/* GCC runtime library's C++ EH code unfortunately pulls in stdio, and we - get undefine references to __impure_ptr, and hence the following - hack. It should be reasonably safe however as long as this file - is built using -mno-cygwin as is intended. */ -int _impure_ptr; - -/* we *know* we're being built with GCC */ -#define alloca __builtin_alloca - -// Version string. -static const char *version_string = "@(#)strace V1.0, Copyright (C) 2001, 2002 Red Hat Inc., " __DATE__ "\n"; - -static const char *pgm; -static int forkdebug = 0; -static int numerror = 1; -static int usecs = 1; -static int delta = 1; -static int hhmmss = 0; -static int bufsize = 0; -static int new_window = 0; -static long flush_period = 0; - -static BOOL close_handle (HANDLE h, DWORD ok); - -#define CloseHandle(h) close_handle(h, 0) - -struct child_list -{ - DWORD id; - HANDLE hproc; - int saw_stars; - char nfields; - long long start_time; - DWORD last_usecs; - struct child_list *next; - child_list ():id (0), hproc (NULL), saw_stars (0), nfields (0), - start_time (0), last_usecs (0), next (NULL) - { - } -}; - -child_list children; - -static void -warn (int geterrno, const char *fmt, ...) -{ - va_list args; - char buf[4096]; - - va_start (args, fmt); - sprintf (buf, "%s: ", pgm); - vsprintf (strchr (buf, '\0'), fmt, args); - if (geterrno) - perror (buf); - else - { - fputs (buf, stderr); - fputs ("\n", stderr); - } -} - -static void __attribute__ ((noreturn)) -error (int geterrno, const char *fmt, ...) -{ - va_list args; - char buf[4096]; - - va_start (args, fmt); - sprintf (buf, "%s: ", pgm); - vsprintf (strchr (buf, '\0'), fmt, args); - if (geterrno) - perror (buf); - else - { - fputs (buf, stderr); - fputs ("\n", stderr); - } - ExitProcess (1); -} - -DWORD lastid = 0; -HANDLE lasth; - -#define PROCFLAGS \ - PROCESS_ALL_ACCESS /*(PROCESS_DUP_HANDLE | PROCESS_TERMINATE | PROCESS_VM_READ | PROCESS_VM_WRITE) */ -static void -add_child (DWORD id, HANDLE hproc) -{ - child_list *c = children.next; - children.next = new (child_list); - children.next->next = c; - lastid = children.next->id = id; - lasth = children.next->hproc = hproc; -} - -static child_list * -get_child (DWORD id) -{ - child_list *c; - for (c = &children; (c = c->next) != NULL;) - if (c->id == id) - return c; - - error (0, "no process id %d found", id); -} - -static void -remove_child (DWORD id) -{ - child_list *c; - if (id == lastid) - lastid = 0; - for (c = &children; c->next != NULL; c = c->next) - if (c->next->id == id) - { - child_list *c1 = c->next; - c->next = c1->next; - delete c1; - return; - } - - error (0, "no process id %d found", id); -} - -#define LINE_BUF_CHUNK 128 - -class linebuf -{ - size_t alloc; -public: - size_t ix; - char *buf; - linebuf () - { - ix = 0; - alloc = 0; - buf = NULL; - } - ~linebuf () - { - if (buf) - free (buf); - } - void add (const char *what, int len); - void add (const char *what) - { - add (what, strlen (what)); - } - void prepend (const char *what, int len); -}; - -void -linebuf::add (const char *what, int len) -{ - size_t newix; - if ((newix = ix + len) >= alloc) - { - alloc += LINE_BUF_CHUNK + len; - buf = (char *) realloc (buf, alloc + 1); - } - memcpy (buf + ix, what, len); - ix = newix; - buf[ix] = '\0'; -} - -void -linebuf::prepend (const char *what, int len) -{ - int buflen; - size_t newix; - if ((newix = ix + len) >= alloc) - { - alloc += LINE_BUF_CHUNK + len; - buf = (char *) realloc (buf, alloc + 1); - buf[ix] = '\0'; - } - if ((buflen = strlen (buf))) - memmove (buf + len, buf, buflen + 1); - else - buf[newix] = '\0'; - memcpy (buf, what, len); - ix = newix; -} - -static void -make_command_line (linebuf & one_line, char **argv) -{ - for (; *argv; argv++) - { - char *p = NULL; - const char *a = *argv; - - int len = strlen (a); - if (len != 0 && !(p = strpbrk (a, " \t\n\r\""))) - one_line.add (a, len); - else - { - one_line.add ("\"", 1); - for (; p; a = p, p = strchr (p, '"')) - { - one_line.add (a, ++p - a); - if (p[-1] == '"') - one_line.add ("\"", 1); - } - if (*a) - one_line.add (a); - one_line.add ("\"", 1); - } - one_line.add (" ", 1); - } - - if (one_line.ix) - one_line.buf[one_line.ix - 1] = '\0'; - else - one_line.add ("", 1); -} - -static DWORD child_pid; - -static BOOL WINAPI -ctrl_c (DWORD) -{ - static int tic = 1; - if ((tic ^= 1) && !GenerateConsoleCtrlEvent (CTRL_C_EVENT, 0)) - error (0, "couldn't send CTRL-C to child, win32 error %d\n", - GetLastError ()); - return TRUE; -} - -DWORD (*cygwin_internal) (int, ...); - -static int -load_cygwin () -{ - static HMODULE h; - - if (cygwin_internal) - return 1; - - if (h) - return 0; - - if (!(h = LoadLibrary ("cygwin1.dll"))) - { - errno = ENOENT; - return 0; - } - if (!(cygwin_internal = (DWORD (*) (int, ...)) GetProcAddress (h, "cygwin_internal"))) - { - errno = ENOSYS; - return 0; - } - return 1; -} - -static void -attach_process (pid_t pid) -{ - load_cygwin (); - child_pid = (DWORD) cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid); - if (!child_pid) - error (0, "no such pid - %d", pid); - - if (!DebugActiveProcess (child_pid)) - error (0, "couldn't attach to pid %d<%d> for debugging", pid, child_pid); - - (void) cygwin_internal (CW_STRACE_TOGGLE, pid); - printf ("Attached to pid %d (windows pid %u)\n", pid, (unsigned) child_pid); - return; -} - - -static void -create_child (char **argv) -{ - linebuf one_line; - - STARTUPINFO si; - PROCESS_INFORMATION pi; - BOOL ret; - DWORD flags; - - if (!*argv) - error (0, "no program argument specified"); - - memset (&si, 0, sizeof (si)); - si.cb = sizeof (si); - - /* cygwin32_conv_to_win32_path (exec_file, real_path); */ - - flags = forkdebug ? 0 : DEBUG_ONLY_THIS_PROCESS; - flags |= CREATE_DEFAULT_ERROR_MODE | DEBUG_PROCESS; - flags |= (new_window ? CREATE_NEW_CONSOLE | CREATE_NEW_PROCESS_GROUP : 0); - - make_command_line (one_line, argv); - - SetConsoleCtrlHandler (NULL, 0); - ret = CreateProcess (0, one_line.buf, /* command line */ - NULL, /* Security */ - NULL, /* thread */ - TRUE, /* inherit handles */ - flags, /* start flags */ - NULL, NULL, /* current directory */ - &si, &pi); - if (!ret) - error (0, "error creating process %s, (error %d)", *argv, - GetLastError ()); - - CloseHandle (pi.hThread); - CloseHandle (pi.hProcess); - child_pid = pi.dwProcessId; - SetConsoleCtrlHandler (ctrl_c, 1); -} - -static int -output_winerror (FILE *ofile, char *s) -{ - char *winerr = strstr (s, "Win32 error "); - if (!winerr) - return 0; - - DWORD errnum = atoi (winerr + sizeof ("Win32 error ") - 1); - if (!errnum) - return 0; - - /* - * NOTE: Currently there is no policy for how long the - * the buffers are, and looks like 256 is a smallest one - * (dlfcn.cc). Other than error 1395 (length 213) and - * error 1015 (length 249), the rest are all under 188 - * characters, and so I'll use 189 as the buffer length. - * For those longer error messages, FormatMessage will - * return FALSE, and we'll get the old behaviour such as - * ``Win32 error 1395'' etc. - */ - char buf[4096]; - if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - errnum, - MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) buf, sizeof (buf), NULL)) - return 0; - - /* Get rid the trailing CR/NL pair. */ - char *p = strchr (buf, '\0'); - p[-2] = '\n'; - p[-1] = '\0'; - - *winerr = '\0'; - fputs (s, ofile); - fputs (buf, ofile); - return 1; -} - -static SYSTEMTIME * -syst (long long t) -{ - FILETIME n; - static SYSTEMTIME st; - long long now = t + ((long long) usecs * 10); - n.dwHighDateTime = now >> 32; - n.dwLowDateTime = now & 0xffffffff; - FileTimeToSystemTime (&n, &st); - return &st; -} - -static void __stdcall -handle_output_debug_string (DWORD id, LPVOID p, unsigned mask, FILE *ofile) -{ - int len; - int special; - char alen[3 + 8 + 1]; - DWORD nbytes; - child_list *child = get_child (id); - HANDLE hchild = child->hproc; -#define INTROLEN (sizeof (alen) - 1) - - if (id == lastid && hchild != lasth) - warn (0, "%p != %p", hchild, lasth); - - alen[INTROLEN] = '\0'; - if (!ReadProcessMemory (hchild, p, alen, INTROLEN, &nbytes)) -#ifndef DEBUGGING - return; -#else - error (0, - "couldn't get message length from subprocess %d<%p>, windows error %d", - id, hchild, GetLastError ()); -#endif - - if (strncmp (alen, "cYg", 3)) - return; - len = (int) strtoul (alen + 3, NULL, 16); - if (!len) - return; - - if (len > 0) - special = 0; - else - { - special = len; - if (special == _STRACE_INTERFACE_ACTIVATE_ADDR) - len = 17; - } - - char *buf; - buf = (char *) alloca (len + 65) + 10; - - if (!ReadProcessMemory (hchild, ((char *) p) + INTROLEN, buf, len, &nbytes)) - error (0, "couldn't get message from subprocess, windows error %d", - GetLastError ()); - - buf[len] = '\0'; - char *s = strtok (buf, " "); - - unsigned n = strtoul (s, NULL, 16); - - s = strchr (s, '\0') + 1; - - if (special == _STRACE_INTERFACE_ACTIVATE_ADDR) - { - DWORD new_flag = 1; - if (!WriteProcessMemory (hchild, (LPVOID) n, &new_flag, - sizeof (new_flag), &nbytes)) - error (0, - "couldn't write strace flag to subprocess, windows error %d", - GetLastError ()); - return; - } - - char *origs = s; - - if (mask & n) - /* got it */ ; - else if (!(mask & _STRACE_ALL) || (n & _STRACE_NOTALL)) - return; /* This should not be included in "all" output */ - - DWORD dusecs, usecs; - char *ptusec, *ptrest; - - dusecs = strtoul (s, &ptusec, 10); - char *q = ptusec; - while (*q == ' ') - q++; - if (*q != '[') - { - usecs = strtoul (q, &ptrest, 10); - while (*ptrest == ' ') - ptrest++; - } - else - { - ptrest = q; - ptusec = s; - usecs = dusecs; - } - - if (child->saw_stars == 0) - { - FILETIME st; - char *news; - - GetSystemTimeAsFileTime (&st); - FileTimeToLocalFileTime (&st, &st); - child->start_time = st.dwHighDateTime; - child->start_time <<= 32; - child->start_time |= st.dwLowDateTime; - if (*(news = ptrest) != '[') - child->saw_stars = 2; - else - { - child->saw_stars++; - while ((news = strchr (news, ' ')) != NULL && *++news != '*') - child->nfields++; - if (news == NULL) - child->saw_stars++; - else - { - s = news; - child->nfields++; - } - } - } - else if (child->saw_stars < 2) - { - int i; - char *news; - if (*(news = ptrest) != '[') - child->saw_stars = 2; - else - { - for (i = 0; i < child->nfields; i++) - if ((news = strchr (news, ' ')) == NULL) - break; // Should never happen - else - news++; - - if (news == NULL) - child->saw_stars = 2; - else - { - s = news; - if (*s == '*') - { - SYSTEMTIME *st = syst (child->start_time); - fprintf (ofile, - "Date/Time: %d-%02d-%02d %02d:%02d:%02d\n", - st->wYear, st->wMonth, st->wDay, st->wHour, - st->wMinute, st->wSecond); - child->saw_stars++; - } - } - } - } - - long long d = usecs - child->last_usecs; - char intbuf[40]; - - if (child->saw_stars < 2 || s != origs) - /* Nothing */ ; - else if (hhmmss) - { - s = ptrest - 9; - SYSTEMTIME *st = syst (child->start_time + (long long) usecs * 10); - sprintf (s, "%02d:%02d:%02d", st->wHour, st->wMinute, st->wSecond); - *strchr (s, '\0') = ' '; - } - else if (!delta) - s = ptusec; - else - { - s = ptusec; - sprintf (intbuf, "%5d ", (int) d); - int len = strlen (intbuf); - - memcpy ((s -= len), intbuf, len); - } - - child->last_usecs = usecs; - if (numerror || !output_winerror (ofile, s)) - fputs (s, ofile); - if (!bufsize) - fflush (ofile); -} - -static void -proc_child (unsigned mask, FILE *ofile) -{ - DEBUG_EVENT ev; - int processes = 0; - time_t cur_time, last_time; - - SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST); - last_time = time (NULL); - while (1) - { - BOOL debug_event = WaitForDebugEvent (&ev, 1000); - DWORD status = DBG_CONTINUE; - - if (bufsize && flush_period > 0 && - (cur_time = time (NULL)) >= last_time + flush_period) - { - last_time = cur_time; - fflush (ofile); - } - - if (!debug_event) - continue; - - switch (ev.dwDebugEventCode) - { - case CREATE_PROCESS_DEBUG_EVENT: - if (ev.u.CreateProcessInfo.hFile) - CloseHandle (ev.u.CreateProcessInfo.hFile); - add_child (ev.dwProcessId, ev.u.CreateProcessInfo.hProcess); - processes++; - break; - - case CREATE_THREAD_DEBUG_EVENT: - break; - - case LOAD_DLL_DEBUG_EVENT: - if (ev.u.LoadDll.hFile) - CloseHandle (ev.u.LoadDll.hFile); - break; - - case OUTPUT_DEBUG_STRING_EVENT: - handle_output_debug_string (ev.dwProcessId, - ev.u.DebugString.lpDebugStringData, - mask, ofile); - break; - - case EXIT_PROCESS_DEBUG_EVENT: - remove_child (ev.dwProcessId); - break; - case EXCEPTION_DEBUG_EVENT: - if (ev.u.Exception.ExceptionRecord.ExceptionCode != - STATUS_BREAKPOINT) - { - status = DBG_EXCEPTION_NOT_HANDLED; -#if 0 - fprintf (stderr, "exception %p at %p\n", - ev.u.Exception.ExceptionRecord.ExceptionCode, - ev.u.Exception.ExceptionRecord.ExceptionAddress); -#endif - } - break; - } - if (!ContinueDebugEvent (ev.dwProcessId, ev.dwThreadId, status)) - error (0, "couldn't continue debug event, windows error %d", - GetLastError ()); - if (ev.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT && --processes == 0) - break; - } -} - -static void -dostrace (unsigned mask, FILE *ofile, pid_t pid, char **argv) -{ - if (*argv && pid) - error (0, "can't use -p with program argument"); - if (!pid) - create_child (argv); - else - attach_process (pid); - proc_child (mask, ofile); - - return; -} - -typedef struct tag_mask_mnemonic -{ - unsigned long val; - const char *text; -} -mask_mnemonic; - -static const mask_mnemonic mnemonic_table[] = { - {_STRACE_ALL, "all"}, - {_STRACE_FLUSH, "flush"}, - {_STRACE_INHERIT, "inherit"}, - {_STRACE_UHOH, "uhoh"}, - {_STRACE_SYSCALL, "syscall"}, - {_STRACE_STARTUP, "startup"}, - {_STRACE_DEBUG, "debug"}, - {_STRACE_PARANOID, "paranoid"}, - {_STRACE_TERMIOS, "termios"}, - {_STRACE_SELECT, "select"}, - {_STRACE_WM, "wm"}, - {_STRACE_SIGP, "sigp"}, - {_STRACE_MINIMAL, "minimal"}, - {_STRACE_EXITDUMP, "exitdump"}, - {_STRACE_SYSTEM, "system"}, - {_STRACE_NOMUTEX, "nomutex"}, - {_STRACE_MALLOC, "malloc"}, - {_STRACE_THREAD, "thread"}, - {0, NULL} -}; - -static unsigned long -mnemonic2ul (const char *nptr, char **endptr) -{ - // Look up mnemonic in table, return value. - // *endptr = ptr to char that breaks match. - const mask_mnemonic *mnp = mnemonic_table; - - while (mnp->text != NULL) - { - if (strcmp (mnp->text, nptr) == 0) - { - // Found a match. - if (endptr != NULL) - { - *endptr = ((char *) nptr) + strlen (mnp->text); - } - return mnp->val; - } - mnp++; - } - - // Didn't find it. - if (endptr != NULL) - { - *endptr = (char *) nptr; - } - return 0; -} - -static unsigned long -parse_mask (const char *ms, char **endptr) -{ - const char *p = ms; - char *newp; - unsigned long retval = 0, thisval; - const size_t bufsize = 16; - char buffer[bufsize]; - size_t len; - - while (*p != '\0') - { - // First extract the term, terminate it, and lowercase it. - strncpy (buffer, p, bufsize); - buffer[bufsize - 1] = '\0'; - len = strcspn (buffer, "+,\0"); - buffer[len] = '\0'; - strlwr (buffer); - - // Check if this is a mnemonic. We have to do this first or strtoul() - // will false-trigger on anything starting with "a" through "f". - thisval = mnemonic2ul (buffer, &newp); - if (buffer == newp) - { - // This term isn't mnemonic, check if it's hex. - thisval = strtoul (buffer, &newp, 16); - if (newp != buffer + len) - { - // Not hex either, syntax error. - *endptr = (char *) p; - return 0; - } - } - - p += len; - retval += thisval; - - // Handle operators - if (*p == '\0') - break; - if ((*p == '+') || (*p == ',')) - { - // For now these both equate to addition/ORing. Until we get - // fancy and add things like "all-<something>", all we need do is - // continue the looping. - p++; - continue; - } - else - { - // Syntax error - *endptr = (char *) p; - return 0; - } - } - - *endptr = (char *) p; - return retval; -} - -static void -usage () -{ - fprintf (stderr, "\ -Usage: strace [OPTIONS] <command-line>\n\ - -b, --buffer-size=SIZE set size of output file buffer\n\ - -d, --no-delta don't display the delta-t microsecond timestamp\n\ - -f, --trace-children also trace forked child processes\n\ - -h, --help display this help info\n\ - -m, --mask=MASK set message filter mask\n\ - -o, --output=FILENAME set output file to FILENAME\n\ - -p, --pid=n attach to executing program with cygwin pid n\n\ - -n, --crack-error-numbers output descriptive text instead of error\n\ - numbers for Windows errors\n\ - -S, --flush-period=PERIOD flush buffered strace output every PERIOD secs\n\ - -t, --timestamp use an absolute hh:mm:ss timestamp insted of the\n\ - default microsecond timestamp. Implies -d\n\ - -v, --version display version info\n\ - -w, --new-window spawn program under test in a new window\n\ -\n\ - MASK can be any combination of the following mnemonics and/or hex values\n\ - (0x is optional). Combine masks with '+' or ',' like so:\n\ -\n\ - --mask=wm+system,malloc+0x00800\n\ -\n\ - Mnemonic Hex Corresponding Def Description\n\ - =========================================================================\n\ - all 0x00001 (_STRACE_ALL) All strace messages.\n\ - flush 0x00002 (_STRACE_FLUSH) Flush output buffer after each message.\n\ - inherit 0x00004 (_STRACE_INHERIT) Children inherit mask from parent.\n\ - uhoh 0x00008 (_STRACE_UHOH) Unusual or weird phenomenon.\n\ - syscall 0x00010 (_STRACE_SYSCALL) System calls.\n\ - startup 0x00020 (_STRACE_STARTUP) argc/envp printout at startup.\n\ - debug 0x00040 (_STRACE_DEBUG) Info to help debugging. \n\ - paranoid 0x00080 (_STRACE_PARANOID) Paranoid info.\n\ - termios 0x00100 (_STRACE_TERMIOS) Info for debugging termios stuff.\n\ - select 0x00200 (_STRACE_SELECT) Info on ugly select internals.\n\ - wm 0x00400 (_STRACE_WM) Trace Windows msgs (enable _strace_wm).\n\ - sigp 0x00800 (_STRACE_SIGP) Trace signal and process handling.\n\ - minimal 0x01000 (_STRACE_MINIMAL) Very minimal strace output.\n\ - exitdump 0x04000 (_STRACE_EXITDUMP) Dump strace cache on exit.\n\ - system 0x08000 (_STRACE_SYSTEM) Serious error which goes to console and log.\n\ - nomutex 0x10000 (_STRACE_NOMUTEX) Don't use mutex for synchronization.\n\ - malloc 0x20000 (_STRACE_MALLOC) Trace malloc calls.\n\ - thread 0x40000 (_STRACE_THREAD) Thread-locking calls.\n\ -"); -} - -static void -version () -{ - fputs (version_string + 4, stderr); -} - -struct option longopts[] = { - {"buffer-size", required_argument, NULL, 'b'}, - {"help", no_argument, NULL, 'h'}, - {"flush-period", required_argument, NULL, 'S'}, - {"mask", required_argument, NULL, 'm'}, - {"new-window", no_argument, NULL, 'w'}, - {"output", required_argument, NULL, 'o'}, - {"no-delta", no_argument, NULL, 'd'}, - {"pid", required_argument, NULL, 'p'}, - {"timestamp", no_argument, NULL, 't'}, - {"trace-children", no_argument, NULL, 'f'}, - {"translate-error-numbers", no_argument, NULL, 'n'}, - {"usecs", no_argument, NULL, 'u'}, - {"version", no_argument, NULL, 'v'}, - {NULL, 0, NULL, 0} -}; - -static const char *const opts = "b:dhfm:no:p:S:tuvw"; - -int -main (int argc, char **argv) -{ - unsigned mask = 0; - FILE *ofile = NULL; - pid_t attach_pid = 0; - int opt; - - if (!(pgm = strrchr (*argv, '\\')) && !(pgm = strrchr (*argv, '/'))) - pgm = *argv; - else - pgm++; - - while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) - switch (opt) - { - case 'b': - bufsize = atoi (optarg); - break; - case 'd': - delta ^= 1; - break; - case 'f': - forkdebug ^= 1; - break; - case 'h': - // Print help and exit - usage (); - return 1; - break; - case 'm': - { - char *endptr; - mask = parse_mask (optarg, &endptr); - if (*endptr != '\0') - { - // Bad mask expression. - error (0, "syntax error in mask expression \"%s\" near \ -character #%d.\n", optarg, (int) (endptr - optarg), endptr); - } - break; - } - case 'n': - numerror ^= 1; - break; - case 'o': - if ((ofile = fopen (optarg, "w")) == NULL) - error (1, "can't open %s", optarg); -#ifdef F_SETFD - (void) fcntl (fileno (ofile), F_SETFD, 0); -#endif - break; - case 'p': - attach_pid = strtol (optarg, NULL, 10); - break; - case 'S': - flush_period = strtol (optarg, NULL, 10); - break; - case 't': - hhmmss ^= 1; - break; - case 'u': - // FIXME: currently unimplemented - usecs ^= 1; - break; - case 'v': - // Print version info and exit - version (); - return 1; - break; - case 'w': - new_window ^= 1; - break; - } - - if (!mask) - mask = 1; - - if (bufsize) - setvbuf (ofile, (char *) alloca (bufsize), _IOFBF, bufsize); - - if (!ofile) - ofile = stdout; - - dostrace (mask, ofile, attach_pid, argv + optind); -} - -#undef CloseHandle - -static BOOL -close_handle (HANDLE h, DWORD ok) -{ - child_list *c; - for (c = &children; (c = c->next) != NULL;) - if (c->hproc == h && c->id != ok) - error (0, "Closing child handle %p", h); - return CloseHandle (h); -} diff --git a/winsup/utils/umount.cc b/winsup/utils/umount.cc deleted file mode 100644 index cff08c70a..000000000 --- a/winsup/utils/umount.cc +++ /dev/null @@ -1,210 +0,0 @@ -/* umount.cc - - Copyright 1996, 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 -Cygwin license. Please consult the file "CYGWIN_LICENSE" for -details. */ - -#include <stdio.h> -#include <string.h> -#include <sys/mount.h> -#include <mntent.h> -#include <stdlib.h> -#include <errno.h> -#include <getopt.h> - -static void remove_all_mounts (); -static void remove_all_user_mounts (); -static void remove_all_system_mounts (); -static void remove_cygdrive_prefix (int flags); - -static const char *progname; - -struct option longopts[] = -{ - {"help", no_argument, NULL, 'h' }, - {"remove-all-mounts", no_argument, NULL, 'A'}, - {"remove-cygdrive-prefix", no_argument, NULL, 'c'}, - {"remove-system-mounts", no_argument, NULL, 'S'}, - {"remove-user-mounts", no_argument, NULL, 'U'}, - {"system", no_argument, NULL, 's'}, - {"user", no_argument, NULL, 'u'}, - {NULL, 0, NULL, 0} -}; - -char opts[] = "hASUsuc"; - -static void -usage (void) -{ - fprintf (stderr, "Usage %s [OPTION] [<posixpath>]\n\ - -A, --remove-all-mounts remove all mounts\n\ - -c, --remove-cygdrive-prefix remove cygdrive prefix\n\ - -s, --system remove system mount\n\ - -S, --remove-system-mounts remove all system mounts\n\ - -u, --user remove user mount\n\ - -U, --remove-user-mounts remove all user mounts\n\ -", progname); - exit (1); -} - -static void -error (const char *path) -{ - fprintf (stderr, "%s: %s: %s\n", progname, path, strerror (errno)); - exit (1); -} - -int -main (int argc, char **argv) -{ - int i; - int flags = 0; - progname = argv[0]; - enum do_what - { - nada, - saw_remove_all_mounts, - saw_remove_cygdrive_prefix, - saw_remove_all_system_mounts, - saw_remove_all_user_mounts - } do_what = nada; - - if (argc == 1) - usage (); - - while ((i = getopt_long (argc, argv, opts, longopts, NULL)) != EOF) - switch (i) - { - case 'A': - if (do_what != nada) - usage (); - do_what = saw_remove_all_mounts; - break; - case 'c': - if (do_what != nada) - usage (); - do_what = saw_remove_cygdrive_prefix; - break; - case 's': - flags |= MOUNT_SYSTEM; - break; - case 'S': - if (do_what != nada) - usage (); - do_what = saw_remove_all_system_mounts; - break; - case 'u': - flags &= ~MOUNT_SYSTEM; - break; - case 'U': - if (do_what != nada) - usage (); - do_what = saw_remove_all_user_mounts; - break; - default: - usage (); - } - - switch (do_what) - { - case saw_remove_all_mounts: - if (optind != argc) - usage (); - remove_all_mounts (); - break; - case saw_remove_cygdrive_prefix: - if (optind != argc) - usage (); - remove_cygdrive_prefix (flags); - break; - case saw_remove_all_system_mounts: - if (optind != argc) - usage (); - remove_all_system_mounts (); - break; - case saw_remove_all_user_mounts: - if (optind != argc) - usage (); - remove_all_user_mounts (); - break; - default: - if (optind != argc - 1) - usage (); - if (cygwin_umount (argv[optind], flags) != 0) - error (argv[optind]); - } - - return 0; -} - -/* remove_all_mounts: Unmount all mounts. */ -static void -remove_all_mounts () -{ - remove_all_user_mounts (); - remove_all_system_mounts (); -} - -/* remove_all_user_mounts: Unmount all user mounts. */ -static void -remove_all_user_mounts () -{ - FILE *m = setmntent ("/-not-used-", "r"); - struct mntent *p; - - while ((p = getmntent (m)) != NULL) - { - /* Remove the mount if it's a user mount. */ - if (strncmp (p->mnt_type, "user", 4) == 0 && - strstr (p->mnt_opts, "noumount") == NULL) - { - if (cygwin_umount (p->mnt_dir, 0)) - error (p->mnt_dir); - - /* We've modified the table so we need to start over. */ - endmntent (m); - m = setmntent ("/-not-used-", "r"); - } - } - - endmntent (m); -} - -/* remove_all_system_mounts: Unmount all system mounts. */ -static void -remove_all_system_mounts () -{ - FILE *m = setmntent ("/-not-used-", "r"); - struct mntent *p; - - while ((p = getmntent (m)) != NULL) - { - /* Remove the mount if it's a system mount. */ - if (strncmp (p->mnt_type, "system", 6) == 0 && - strstr (p->mnt_opts, "noumount") == NULL) - { - if (cygwin_umount (p->mnt_dir, MOUNT_SYSTEM)) - error (p->mnt_dir); - - /* We've modified the table so we need to start over. */ - endmntent (m); - m = setmntent ("/-not-used-", "r"); - } - } - - endmntent (m); -} - -/* remove_cygdrive_prefix: Remove cygdrive user or system path prefix. */ -static void -remove_cygdrive_prefix (int flags) -{ - int res = cygwin_umount (NULL, flags | MOUNT_AUTO); - if (res) - error ("remove_cygdrive_prefix"); - exit (0); -} diff --git a/winsup/utils/utils.sgml b/winsup/utils/utils.sgml deleted file mode 100644 index 761040430..000000000 --- a/winsup/utils/utils.sgml +++ /dev/null @@ -1,738 +0,0 @@ -<sect1 id="using-utils"><title>Cygwin Utilities</title> - -<para>Cygwin comes with a number of command-line utilities that are -used to manage the UNIX emulation portion of the Cygwin environment. -While many of these reflect their UNIX counterparts, each was written -specifically for Cygwin.</para> - -<sect2 id="cygcheck"><title>cygcheck</title> - -<screen> -Usage: cygcheck [-s] [-v] [-r] [-h] [program ...] - -c check current package setup - -h give help about the info - -s system information - -v verbose output (indented) (for -s or programs) - -r registry search (requires -s) - -V version info -You must at least give either -s or a program name -</screen> - -<para>The <command>cygcheck</command> program is a diagnostic utility -that examines your system and reports the information that is -significant to the proper operation of Cygwin programs. It can give -information about a specific program (or program) you are trying to -run, general system information, or both. If you list one or more -programs on the command line, it will diagnose the runtime environment -of that program or programs. If you specify the <literal>-s</literal> -option, it will give general system information. If you specify -<literal>-s</literal> and list one or more programs on the command line, -it reports on both.</para> - -<para>The <literal>-c</literal> option causes the "program" arguments -to be interpreted as package names. <command>cygcheck</command> will -report the current version of the package that you specify. With no -arguments, <command>cygcheck</command> will report on all packages.</para> - -<para>The <command>cygcheck</command> program should be used to send -information about your system to Cygnus for troubleshooting (if your -support representative requests it). When asked to run this command, -include all the options plus any commands you are having trouble with, -and save the output so that you can mail it to Cygnus, like -this:</para> - -<screen> -<prompt>C:\Cygnus></prompt> <userinput>cygcheck -s -v -r -h > tocygnus.txt</userinput> -</screen> - -<para>The <literal>-v</literal> option causes the output to be more -verbose. What this means is that additional information will be -reported which is usually not interesting, such as the internal -version numbers of DLLs, additional information about recursive DLL -usage, and if a file in one directory in the PATH also occurs in other -directories on the PATH. </para> - -<para>The <literal>-r</literal> option causes -<command>cygcheck</command> to search your registry for information -that is relevent to Cygnus programs. These registry entries are the -ones that have "Cygnus" in the name. If you are paranoid about -privacy, you may remove information from this report, but please keep -in mind that doing so makes it harder for Cygnus to diagnose your -problems.</para> - -<para>The <literal>-h</literal> option prints additional helpful -messages in the report, at the beginning of each section. It also -adds table column headings. While this is useful information, it also -adds some to the size of the report, so if you want a compact report -or if you know what everything is already, just leave this out.</para> - -</sect2> - -<sect2 id="cygpath"><title>cygpath</title> - -<screen> -Usage: cygpath.exe [-p|--path] (-u|--unix)|(-w|--windows [-s|--short-name]) filename - -a|--absolute output absolute path - -c|--close handle close handle (for use in captured process) - -f|--file file read file for input path information - -i|--ignore ignore missing argument - -p|--path filename argument is a path - -s|--short-name print Windows short form of filename - -u|--unix print Unix form of filename - -v|--version output version information and exit - -w|--windows print Windows form of filename - -A|--allusers use `All Users' instead of current user for -D, -P - -D|--desktop output `Desktop' directory and exit - -P|--smprograms output Start Menu `Programs' directory and exit - -S|--sysdir output system directory and exit - -W|--windir output `Windows' directory and exit -</screen> - -<para>The <command>cygpath</command> program is a utility that -converts Windows native filenames to Cygwin POSIX-style pathnames and -back. It can be used when a Cygwin program needs to pass a file name -to a native Windows program, or expects to get a file name from a -native Windows program. You may use the long or short option names -interchangeably, even though only the short ones are described -here.</para> - -<para>The <literal>-u</literal> and <literal>-w</literal> options -indicate whether you want a conversion from Windows to UNIX (POSIX) -format (<literal>-u</literal>) or a conversion from UNIX (POSIX) to -Windows format (<literal>-w</literal>). You must give exactly -one of these. To give neither or both is an error. Use the -<literal>-s</literal> option in combination with the <literal>-w -</literal> option to convert to Windows short form.</para> - -<para>The <literal>-p</literal> option means that you want to convert -a path-style string rather than a single filename. For example, the -PATH environment variable is semicolon-delimited in Windows, but -colon-delimited in UNIX. By giving <literal>-p</literal> you are -instructing <command>cygpath</command> to convert between these -formats.</para> - -<para>The <literal>-i</literal> option supresses the print out of the -usage message if no filename argument was given. It can be used in -make file rules converting variables to a proper format that may be -omitted.</para> - -<example><title>Example cygpath usage</title> -<screen> -#!/bin/sh -for i in `echo *.exe | sed 's/\.exe/.cc/'` -do - notepad "`cygpath -w $i`" -done -</screen> -</example> - -<para>The capital options -<literal>-D</literal>, <literal>-P</literal>, <literal>-S</literal>, and -<literal>-W</literal> output directories used by Windows that are not the -same on all systems, for example <literal>-S</literal> might output -C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM. The <literal>-A</literal> option -forces use of the "All Users" directories instead of the current user -for the <literal>-D</literal> and <literal>-P</literal> options. -On Win9x systems with only a single user, <literal>-A</literal> has no -effect; <literal>-D</literal> and <literal>-AD</literal> would have the -same output. - -</sect2> - -<sect2 id="kill"><title>kill</title> - -<screen> -Usage: kill [-f] [-sigN] pid1 [pid2 ...] -</screen> - -<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 program-specified signals such as SIGUSR1 to trigger actions -within the program, like enabling debugging or re-opening log files. -Each program defines the signals they understand.</para> - -<para>Note that, unless you specific the <literal>-f</literal> option, -the "pid" values are the Cygwin pids, not the Windows pids. To get a -list of running programs and their Cygwin pids, use the Cygwin -<command>ps</command> program. <command>ps -W</command> will display -<emphasis>all</emphasis> windows pids.</para> - -<para>To send a specific signal, use the <literal>-signN</literal> -option, either with a signal number or a signal name (minus the "SIG" -part), like these examples:</para> - -<example><title>Using the kill command</title> -<screen> -<prompt>$</prompt> <userinput>kill 123</userinput> -<prompt>$</prompt> <userinput>kill -1 123</userinput> -<prompt>$</prompt> <userinput>kill -HUP 123</userinput> -<prompt>$</prompt> <userinput>kill -f 123</userinput> -</screen> -</example> - -<para>Here is a list of available signals, their numbers, and some -commentary on them, from the file -<literal><sys/signal.h></literal>, which should be considered -the official source of this information.</para> - -<screen> -SIGHUP 1 hangup -SIGINT 2 interrupt -SIGQUIT 3 quit -SIGILL 4 illegal instruction (not reset when caught) -SIGTRAP 5 trace trap (not reset when caught) -SIGABRT 6 used by abort -SIGEMT 7 EMT instruction -SIGFPE 8 floating point exception -SIGKILL 9 kill (cannot be caught or ignored) -SIGBUS 10 bus error -SIGSEGV 11 segmentation violation -SIGSYS 12 bad argument to system call -SIGPIPE 13 write on a pipe with no one to read it -SIGALRM 14 alarm clock -SIGTERM 15 software termination signal from kill -SIGURG 16 urgent condition on IO channel -SIGSTOP 17 sendable stop signal not from tty -SIGTSTP 18 stop signal from tty -SIGCONT 19 continue a stopped process -SIGCHLD 20 to parent on child stop or exit -SIGCLD 20 System V name for SIGCHLD -SIGTTIN 21 to readers pgrp upon background tty read -SIGTTOU 22 like TTIN for output if (tp->t_local&LTOSTOP) -SIGIO 23 input/output possible signal -SIGPOLL 23 System V name for SIGIO -SIGXCPU 24 exceeded CPU time limit -SIGXFSZ 25 exceeded file size limit -SIGVTALRM 26 virtual time alarm -SIGPROF 27 profiling time alarm -SIGWINCH 28 window changed -SIGLOST 29 resource lost (eg, record-lock lost) -SIGUSR1 30 user defined signal 1 -SIGUSR2 31 user defined signal 2 -</screen> - -</sect2> - -<sect2 id="mkgroup"><title>mkgroup</title> - -<screen> -usage: mkgroup [options] [domain] - This program prints a /etc/group file to stdout - Options: - -l,--local print local group information - -d,--domain print global group information from the domain - specified (or from the current domain if there is - no domain specified) - -o,--id-offset offset change the default offset (10000) added to uids - in domain accounts. - -s,--no-sids don't print SIDs in pwd field - (this affects ntsec) - -u,--users print user list in gr_mem field - -?,--help print this message - One of `-l' or `-d' must be given on NT/W2K. -</screen> - -<para>The <command>mkgroup</command> program can be used to help -configure your Windows system to be more UNIX-like by creating an -initial <filename>/etc/group</filename> substitute (some commands need this -file) from your system information. It only works on NT. -To initially set up your machine, -you'd do something like this:</para> - -<example><title>Setting up the groups file</title> -<screen> -<prompt>$</prompt> <userinput>mkdir /etc</userinput> -<prompt>$</prompt> <userinput>mkgroup -l > /etc/group</userinput> -</screen> -</example> - -<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</literal> and <literal>-l</literal> options -allow you to specify where the information comes from, either the -local machine or the default (or given) domain.</para> - -</sect2> - -<sect2 id="mkpasswd"><title>mkpasswd</title> - -<screen> -Usage: mkpasswd [options] [domain] - Usage: mkpasswd [OPTION]... [domain] - This program prints a /etc/passwd file to stdout - Options: - -l,--local print local user accounts - -d,--domain print domain accounts (from current domain - if no domain specified) - -o,--id-offset offset change the default offset (10000) added to uids - in domain accounts. - -g,--local-groups print local group information too - if no domain specified - -m,--no-mount don't use mount points for home dir - -s,--no-sids don't print SIDs in GCOS field - (this affects ntsec) - -p,--path-to-home path if user account has no home dir, use - path instead of /home/ - -u,--username username only return information for the specified user - -?,--help displays this message - One of `-l', `-d' or `-g' must be given on NT/W2K. -</screen> - -<para>The <command>mkpasswd</command> program can be used to help -configure your Windows system to be more UNIX-like by creating an -initial <filename>/etc/passwd</filename> substitute (some commands -need this file) from your system information. It only works on NT. -To initially set up your machine, you'd do something like this:</para> - -<example><title>Setting up the passwd file</title> -<screen> -<prompt>$</prompt> <userinput>mkdir /etc</userinput> -<prompt>$</prompt> <userinput>mkpasswd -l > /etc/passwd</userinput> -</screen> -</example> - -<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</literal> and <literal>-l</literal> options -allow you to specify where the information comes from, either the -local machine or the default (or given) domain.</para> - -</sect2> - -<sect2 id="passwd"><title>passwd</title> - -<screen> -Usage passwd [name] - passwd [-x max] [-n min] [-i inact] [-L len] - passwd {-l|-u|-S} name - -x max set max age of passwords - -n min set min age of passwords - -i inact disables account after inact days of expiry - -L len set min password length - -l lock an account - -u unlock an account - -S show account information -</screen> - -<para> <command>passwd</command> changes passwords for user accounts. -A normal user may only change the password for their own account, -the administrators may change the password for any account. -<command>passwd</command> also changes account information, such as -password expiry dates and intervals.</para> - -<para>Password changes: The user is first prompted for their old -password, if one is present. This password is then encrypted and -compared against the stored password. The user has only one chance to -enter the correct password. The administrators are permitted to -bypass this step so that forgotten passwords may be changed.</para> - -<para>The user is then prompted for a replacement password. -<command>passwd</command> will prompt again and compare the second entry -against the first. Both entries are require to match in order for the -password to be changed.</para> - -<para>After the password has been entered, password aging information -is checked to see if the user is permitted to change their password -at this time. If not, <command>passwd</command> refuses to change the -password and exits.</para> - -<para>Password expiry and length: The password aging information may be -changed by the administrators with the <literal>-x</literal>, -<literal>-n</literal> and <literal>-i</literal> options. The -<literal>-x</literal> option is used to set the maximum number of days -a password remains valid. After <emphasis>max</emphasis> days, the -password is required to be changed. The <literal>-n</literal> option is -used to set the minimum number of days before a password may be changed. -The user will not be permitted to change the password until -<emphasis>min</emphasis> days have elapsed. The <literal>-i</literal> -option is used to disable an account after the password has been expired -for a number of days. After a user account has had an expired password -for <emphasis>inact</emphasis> days, the user may no longer sign on to -the account. Allowed values for the above options are 0 to 999. The -<literal>-L</literal> option sets the minimum length of allowed passwords -for users, which doesn't belong to the administrators group, to -<emphasis>len</emphasis> characters. Allowed values for the minimum -password length are 0 to 14. In any of the above cases, a value of 0 -means `no restrictions'.</para> - -<para>Account maintenance: User accounts may be locked and unlocked with the -<literal>-l</literal> and <literal>-u</literal> flags. The -<literal>-l</literal> option disables an account. The <literal>-u</literal> -option re-enables an account.</para> - -<para>The account status may be given with the <literal>-S</literal> -option. The status information is self explanatory.</para> - -<para>Limitations: Users may not be able to change their password on -some systems.</para> - -</sect2> - -<sect2 id="mount"><title>mount</title> - -<screen> -Usage mount - mount [options] <win32path> <posixpath> - - -b, --binary text files are equivalent to binary files - (newline = \n) - -c, --change-cygdrive-prefix change the cygdrive path prefix to <posixpath> - -f, --force force mount, don't warn about missing mount - point directories - -i, --import-old-mounts copy old registry mount table mounts into the current - mount areas - -p, --show-cygdrive-prefix show user and/or system cygdrive path prefix - -s, --system add mount point to system-wide registry location - -t, --text (default) text files get \r\n line endings - -u, --user (default) add mount point to user registry location - -x, --executable treat all files under mount point as executables - -X, --cygwin-executable treat all files under mount point as cygwin - executables - -m, --mount-commands write mount commands to replace user and - system mount points and cygdrive prefixes - - When invoked without any arguments, mount displays the current mount table. -</screen> - -<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. Please see -<Xref Linkend="mount-table"> for more information on the concepts -behind the Cygwin POSIX file system and strategies for using -mounts.</para> - -<sect3><title>Using mount</title> - -<para>If you just type <command>mount</command> with no parameters, it -will display the current mount table for you.</para> - -<example> -<title>Displaying the current set of mount points</title> -<screen> -<prompt>c:\cygnus\></prompt> <userinput>mount</userinput> -Device Directory Type Flags -D: /d user textmode -C: / system textmode -</screen> -</example> - -<para>In this example, the C -drive is the POSIX root and D drive is mapped to -<filename>/d</filename>. Note that in this case, the root mount is a -system-wide mount point that is visible to all users running Cygwin -programs, whereas the <filename>/d</filename> mount is only visible -to the current user.</para> - -<para>The <command>mount</command> utility is also the mechanism for -adding new mounts to the mount table. The following example -demonstrates how to mount the directory -<filename>C:\cygnus\cygwin-b20\H-i586-cygwin32\bin</filename> -to <filename>/bin</filename> and the network directory -<filename>\\pollux\home\joe\data</filename> to <filename>/data</filename>. -<filename>/bin</filename> is assumed to already exist.</para> - -<example> -<title>Adding mount points</title> -<screen> -<prompt>c:\cygnus\></prompt> <userinput>ls /bin /data</userinput> -ls: /data: No such file or directory -<prompt>c:\cygnus\></prompt> <userinput>mount C:\cygnus\cygwin-b20\H-i586-cygwin32\bin /bin</userinput> -<prompt>c:\cygnus\></prompt> <userinput>mount \\pollux\home\joe\data /data</userinput> -Warning: /data does not exist! -<prompt>c:\cygnus\></prompt> <userinput>mount</userinput> -Device Directory Type Flags -\\pollux\home\joe\data /data user textmode -C:\cygnus\cygwin-b20\H-i586-cygwin32\bin /bin user textmode -D: /d user textmode -\\.\tape1: /dev/st1 user textmode -\\.\tape0: /dev/st0 user textmode -\\.\b: /dev/fd1 user textmode -\\.\a: /dev/fd0 user textmode -C: / system textmode -<prompt>c:\cygnus\></prompt> <userinput>ls /bin/sh</userinput> -/bin/sh -</screen> -</example> - -<para>Note that <command>mount</command> was invoked from the Windows -command shell in the previous example. In many Unix shells, including -bash, it is legal and convenient to use the forward "/" in Win32 -pathnames since the "\" is the shell's escape character. </para> - -<para>The "-s" flag to <command>mount</command> is used to add a mount -in the system-wide mount table used by all Cygwin users on the system, -instead of the user-specific one. System-wide mounts are displayed -by <command>mount</command> as being of the "system" type, as is the -case for the <filename>/</filename> partition in the last example. -Under Windows NT, only those users with Administrator priviledges are -permitted to modify the system-wide mount table.</para> - -<para>Note that a given POSIX path may only exist once in the user -table and once in the global, system-wide table. Attempts to replace -the mount will fail with a busy error. The "-f" (force) flag causes -the old mount to be silently replaced with the new one. It will also -silence warnings about the non-existence of directories at the Win32 -path location.</para> - -<para>The "-b" flag is used to instruct Cygwin to treat binary and -text files in the same manner by default. Binary mode mounts are -marked as "binmode" in the Flags column of <command>mount</command> -output. By default, mounts are in text mode ("textmode" in the Flags -column).</para> - -<para>The "-x" flag is used to instruct Cygwin that the mounted file -is "executable". If the "-x" flag is used with a directory then -all files in the directory are executable. Files ending in certain -extensions (.exe, .com, .bat, .cmd) are assumed to be executable -by default. Files whose first two characters begin with '#!' are -also considered to be executable. This option allows other files -to be marked as executable and avoids the overhead of opening each -file to check for a '#!'.</para> - -</sect3> - -<sect3><title>Cygdrive mount points</title> - -<para>Whenever Cygwin cannot use any of the existing mounts to convert -from a particular Win32 path to a POSIX one, Cygwin will, instead, -convert to a POSIX path using a default mount point: -<filename>/cygdrive</filename>. For example, if Cygwin accesses -<filename>Z:\foo</filename> and the Z drive is not currently in the -mount table, then <filename>Z:\</filename> will be accessible as -<filename>/cygdrive/Z</filename>. The default prefix of -<filename>/cygdrive</filename> may be changed via the -<Xref Linkend="mount"> command.</para> - -<para>The <command>mount</command> utility can be used to change this -default automount prefix through the use of the -"--change-cygdrive-prefix" flag. In the following example, we will -set the automount prefix to <filename>/</filename>:</para> - -<example> -<title>Changing the default prefix</title> -<screen> -<prompt>c:\cygnus\></prompt> <userinput>mount --change-cygdrive-prefix /</userinput> -</screen> -</example> - -<para>Note that you if you set a new prefix in this manner, you can -specify the "-s" flag to make this the system-wide default prefix. By -default, the cygdrive-prefix applies only to the current user. In the -same way, you can specify the "-b" flag such that all new automounted -filesystems default to binary mode file accesses.</para> - -</sect3> - -<sect3><title>Limitations</title> - -<para>Limitations: there is a hard-coded limit of 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>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 -place-holder for the mount point (such as a file, a symbolic link -pointing anywhere, or a non-empty directory), you will get the expected -behavior. Files present in a mount point directory before the mount -become invisible to Cygwin programs. -</para> - -<para>It is sometimes desirable to mount to a non-existent directory, -for example to avoid cluttering the root directory with names -such as -<filename>a</filename>, <filename>b</filename>, <filename>c</filename> -pointing to disks. -Although <command>mount</command> will give you a warning, most -everything will work properly when you refer to the mount point -explicitly. Some strange effects can occur however. -For example if your current working directory is -<filename>/dir</filename>, -say, and <filename>/dir/mtpt</filename> is a mount point, then -<filename>mtpt</filename> will not show up in an <command>ls</command> -or -<command>echo *</command> command and <command>find .</command> will -not -find <filename>mtpt</filename>. -</para> - -</sect3> - -</sect2> - -<sect2 id="ps"><title>ps</title> - -<screen> -Usage ps [-aefl] [-u uid] - -a, -e show processes of all users - -f show process uids, ppids - -l show process uids, ppids, pgids, winpids - -s short process listing - -u uid show processes owned by uid - -W show all windows processes, not just cygwin processes -</screen> - -<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 little information to give. The PID column is the process ID -you need to give to the <command>kill</command> command. The WINPID -column is the process ID that's displayed by NT's Task Manager -program.</para> - -</sect2> - -<sect2 id="umount"><title>umount</title> - -<screen> -Usage umount [options] <posixpath> - -A, --remove-all-mounts remove all mounts - -c, --remove-cygdrive-prefix remove cygdrive prefix - -s, --system remove system mount - -S, --remove-system-mounts remove all system mounts - -u, --user remove user mount - -U, --remove-user-mounts remove all user mounts -</screen> - -<para>The <command>umount</command> program removes mounts from the -mount table. If you specify a POSIX path that corresponds to a -current mount point, <command>umount</command> will remove it from the -user-specific registry area. The -s flag may be used to specify -removing the mount from the system-wide registry area instead -(Administrator priviledges are required).</para> - -<para>The <command>umount</command> utility may also be used to remove -all mounts of a particular type. With the extended options it is -possible to remove all mounts, all automatically-mounted mounts, all -mounts in the current user's registry area, or all mounts in the -system-wide registry area (with Administrator privileges).</para> - -<para>See <Xref Linkend="mount">) for more information on the mount -table.</para> -</sect2> - -<sect2 id="strace"><title>strace</title> - -<screen> -Usage strace [options] program [args...] - - -b, --buffer-size=SIZE set size of output file buffer - -d, --no-delta don't display the delta-t microsecond timestamp - -f, --trace-children also trace forked child processes - -h, --help display help info - -m, --mask=MASK set message filter mask - -n, --crack-error-numbers output descriptive text instead of error - numbers for Windows errors - -o, --output=FILENAME set output file to FILENAME - -p, --pid=pid attach to a running process - -S, --flush-period=PERIOD flush buffered strace output every PERIOD secs - -t, --timestamp use an absolute hh:mm:ss timestamp insted of the - default microsecond timestamp. Implies -d - -v, --version display version info - -w, --new-window spawn program under test in a new window - - MASK can be any combination of the following mnemonics and/or hex values - (0x is optional). Combine masks with '+' or ',' like so: - - --mask=wm+system,malloc+0x00800 - - Mnemonic Hex Corresponding Def Description - ========================================================================= - all 0x00001 (_STRACE_ALL) All strace messages. - flush 0x00002 (_STRACE_FLUSH) Flush output buffer after each message. - inherit 0x00004 (_STRACE_INHERIT) Children inherit mask from parent. - uhoh 0x00008 (_STRACE_UHOH) Unusual or weird phenomenon. - syscall 0x00010 (_STRACE_SYSCALL) System calls. - startup 0x00020 (_STRACE_STARTUP) argc/envp printout at startup. - debug 0x00040 (_STRACE_DEBUG) Info to help debugging. - paranoid 0x00080 (_STRACE_PARANOID) Paranoid info. - termios 0x00100 (_STRACE_TERMIOS) Info for debugging termios stuff. - select 0x00200 (_STRACE_SELECT) Info on ugly select internals. - wm 0x00400 (_STRACE_WM) Trace Windows msgs (enable _strace_wm). - sigp 0x00800 (_STRACE_SIGP) Trace signal and process handling. - minimal 0x01000 (_STRACE_MINIMAL) Very minimal strace output. - exitdump 0x04000 (_STRACE_EXITDUMP) Dump strace cache on exit. - system 0x08000 (_STRACE_SYSTEM) Cache strace messages. - nomutex 0x10000 (_STRACE_NOMUTEX) Don't use mutex for synchronization. - malloc 0x20000 (_STRACE_MALLOC) Trace malloc calls. - thread 0x40000 (_STRACE_THREAD) Thread-locking calls. -</screen> - -<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 file. This program is mainly useful for debugging -the Cygwin DLL itself.</para> -</sect2> - -<sect2 id="regtool"><title>regtool</title> - -<screen> -Regtool Copyright (c) 2000 Red Hat Inc - regtool -h - print this message - regtool [-v|-p|-k|-l] list [key] - list subkeys and values - -p=postfix, like ls -p, appends / postfix to key names - -k=keys, lists only keys - -l=values, lists only values - regtool [-v] add [key\subkey] - add new subkey - regtool [-v] remove [key] - remove key - regtool [-v|-q] check [key] - exit 0 if key exists, 1 if not - regtool [-i|-s|-e|-m] set [key\value] [data ...] - set value - -i=integer -s=string -e=expand-string -m=multi-string - regtool [-v] unset [key\value] - removes value from key - regtool [-q] get [key\value] - prints value to stdout - -q=quiet, no error msg, just return nonzero exit if key/value missing - keys are like \prefix\key\key\key\value, where prefix is any of: - root HKCR HKEY_CLASSES_ROOT - config HKCC HKEY_CURRENT_CONFIG - user HKCU HKEY_CURRENT_USER - machine HKLM HKEY_LOCAL_MACHINE - users HKU HKEY_USERS - example: \user\software\Microsoft\Clock\iFormat -</screen> - -<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 careful.</para> - -<para>The <literal>-v</literal> option means "verbose". For most -commands, this causes additional or lengthier messages to be printed. -Conversely, the <literal>-q</literal> option supresses error messages, -so you can use the exit status of the program to detect if a key -exists or not (for example).</para> - -<para>The <literal>list</literal> command lists the subkeys and values -belonging to the given key. The <literal>add</literal> command adds a -new key. The <literal>remove</literal> command removes a key. Note -that you may need to remove everything in the key before you may -remove it, but don't rely on this stopping you from accidentally -removing too much. The <literal>check</literal> command checks to see -if a key exists (the exit code of the program is zero if it does, -nonzero if it does not).</para> - -<para>The <literal>set</literal> command sets a value within a key. -<literal>-i</literal> means the value is an integer (DWORD). -<literal>-s</literal> means the value is a string. -<literal>-e</literal> means it's an expanding string (it contains -embedded environment variables). <literal>-m</literal> means it's a -multi-string (list). If you don't specify one of these, it tries to -guess the type based on the value you give. If it looks like a -number, it's a number. If it starts with a percent, it's an expanding -string. If you give multiple values, it's a multi-string. Else, it's -a regular string.</para> - -<para>The <literal>unset</literal> command removes a value from a key. -The <literal>get</literal> command gets the value of a value of a key, -and prints it (and nothing else) to stdout. Note: if the value -doesn't exist, an error message is printed and the program returns a -non-zero exit code. If you give <literal>-q</literal>, it doesn't -print the message but does return the non-zero exit code.</para> - -</sect2> - -</sect1> - |