aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygserver
diff options
context:
space:
mode:
authorcvs2svn <>2005-05-30 01:12:17 +0000
committercvs2svn <>2005-05-30 01:12:17 +0000
commitde4edacf43fde07a33b0c382f6af071c3b7cae9d (patch)
treec64c3ae862e5ccdd519d6e2815e70d1753974b02 /winsup/cygserver
parentb66f95cc7386aaf927f293d1d2bb8353bccbe30f (diff)
downloadnewlib-msnyder-tracepoint-checkpoint-branch.zip
newlib-msnyder-tracepoint-checkpoint-branch.tar.gz
newlib-msnyder-tracepoint-checkpoint-branch.tar.bz2
This commit was manufactured by cvs2svn to create branch 'msnyder-msnyder-tracepoint-checkpoint-branchpointmsnyder-tracepoint-checkpoint-branch
tracepoint-checkpoint-branch'. Sprout from master 2005-05-30 01:12:16 UTC DJ Delorie <dj@redhat.com> 'merge from gcc' Cherrypick from cygnus 1999-05-03 07:29:06 UTC Richard Henderson <rth@redhat.com> '19990502 sourceware import': COPYING COPYING.LIB README config/mh-armpic config/mh-elfalphapic config/mh-m68kpic config/mh-papic config/mh-ppcpic config/mh-x86pic config/mt-d30v config/mt-netware config/mt-ospace etc/add-log.el etc/add-log.vi etc/configbuild.ein etc/configbuild.fig etc/configbuild.jin etc/configbuild.tin etc/configdev.ein etc/configdev.fig etc/configdev.jin etc/configdev.tin etc/configure etc/configure.in include/aout/hppa.h include/coff/sym.h include/fopen-bin.h include/fopen-same.h include/fopen-vms.h include/opcode/tahoe.h makefile.vms move-if-change setup.com Delete: compile libgloss/ChangeLog libgloss/Makefile.in libgloss/README libgloss/arm/Makefile.in libgloss/arm/coff-iq80310.specs libgloss/arm/coff-pid.specs libgloss/arm/coff-rdimon.specs libgloss/arm/coff-rdpmon.specs libgloss/arm/coff-redboot.ld libgloss/arm/coff-redboot.specs libgloss/arm/configure libgloss/arm/configure.in libgloss/arm/crt0.S libgloss/arm/elf-iq80310.specs libgloss/arm/elf-pid.specs libgloss/arm/elf-rdimon.specs libgloss/arm/elf-rdpmon.specs libgloss/arm/elf-redboot.ld libgloss/arm/elf-redboot.specs libgloss/arm/libcfunc.c libgloss/arm/redboot-crt0.S libgloss/arm/redboot-syscalls.c libgloss/arm/swi.h libgloss/arm/syscall.h libgloss/arm/syscalls.c libgloss/arm/trap.S libgloss/close.c libgloss/config/default.mh libgloss/config/default.mt libgloss/config/dos.mh libgloss/config/mips.mt libgloss/config/mn10200.mt libgloss/config/mn10300.mt libgloss/config/ppc.mh libgloss/configure libgloss/configure.in libgloss/cris/Makefile.in libgloss/cris/configure libgloss/cris/configure.in libgloss/cris/crt0.S libgloss/cris/crti.c libgloss/cris/crtn.c libgloss/cris/gensyscalls libgloss/cris/lcrt0.c libgloss/cris/linunistd.h libgloss/cris/outbyte.c libgloss/cris/setup.S libgloss/crx/Makefile.in libgloss/crx/_exit.c libgloss/crx/_getenv.c libgloss/crx/_rename.c libgloss/crx/close.c libgloss/crx/configure libgloss/crx/configure.in libgloss/crx/crt0.S libgloss/crx/crti.S libgloss/crx/crtn.S libgloss/crx/dvz_hndl.c libgloss/crx/flg_hndl.c libgloss/crx/fstat.c libgloss/crx/getpid.c libgloss/crx/iad_hndl.c libgloss/crx/intable.c libgloss/crx/isatty.c libgloss/crx/kill.c libgloss/crx/lseek.c libgloss/crx/open.c libgloss/crx/putnum.c libgloss/crx/read.c libgloss/crx/sbrk.c libgloss/crx/sim.ld libgloss/crx/stat.c libgloss/crx/svc_hndl.c libgloss/crx/time.c libgloss/crx/und_hndl.c libgloss/crx/unlink.c libgloss/crx/write.c libgloss/d30v/Makefile.in libgloss/d30v/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/frv/Makefile.in libgloss/frv/configure libgloss/frv/configure.in libgloss/frv/crt0.S libgloss/frv/fstat.c libgloss/frv/getpid.c libgloss/frv/isatty.c libgloss/frv/kill.c libgloss/frv/print.c libgloss/frv/putnum.c libgloss/frv/sbrk.c libgloss/frv/sim-close.S libgloss/frv/sim-exit.S libgloss/frv/sim-inbyte.c libgloss/frv/sim-lseek.S libgloss/frv/sim-open.S libgloss/frv/sim-read.S libgloss/frv/sim-time.c libgloss/frv/sim-unlink.S libgloss/frv/sim-write.S libgloss/frv/stat.c libgloss/fstat.c libgloss/getpid.c libgloss/glue.h libgloss/hp74x/Makefile.in libgloss/hp74x/README libgloss/hp74x/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/iq2000/Makefile.in libgloss/iq2000/_exit.c libgloss/iq2000/access.c libgloss/iq2000/chmod.c libgloss/iq2000/chown.c libgloss/iq2000/close.c libgloss/iq2000/configure libgloss/iq2000/configure.in libgloss/iq2000/creat.c libgloss/iq2000/crt0.S libgloss/iq2000/crt1.c libgloss/iq2000/execv.c libgloss/iq2000/execve.c libgloss/iq2000/fork.c libgloss/iq2000/fstat.c libgloss/iq2000/getpid.c libgloss/iq2000/gettime.c libgloss/iq2000/isatty.c libgloss/iq2000/kill.c libgloss/iq2000/lseek.c libgloss/iq2000/open.c libgloss/iq2000/pipe.c libgloss/iq2000/read.c libgloss/iq2000/sbrk.c libgloss/iq2000/sim.ld libgloss/iq2000/stat.c libgloss/iq2000/test.c libgloss/iq2000/time.c libgloss/iq2000/times.c libgloss/iq2000/trap.c libgloss/iq2000/trap.h libgloss/iq2000/unlink.c libgloss/iq2000/utime.c libgloss/iq2000/wait.c libgloss/iq2000/write.c libgloss/isatty.c libgloss/kill.c libgloss/libnosys/Makefile.in libgloss/libnosys/_exit.c libgloss/libnosys/acconfig.h libgloss/libnosys/close.c libgloss/libnosys/config.h.in libgloss/libnosys/configure libgloss/libnosys/configure.in libgloss/libnosys/environ.c libgloss/libnosys/errno.c libgloss/libnosys/execve.c libgloss/libnosys/fork.c libgloss/libnosys/fstat.c libgloss/libnosys/getpid.c libgloss/libnosys/gettod.c libgloss/libnosys/isatty.c libgloss/libnosys/kill.c libgloss/libnosys/link.c libgloss/libnosys/lseek.c libgloss/libnosys/open.c libgloss/libnosys/read.c libgloss/libnosys/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/m68hc11/Makefile.in libgloss/m68hc11/configure libgloss/m68hc11/configure.in libgloss/m68hc11/crt0.S libgloss/m68hc11/sci-inout.S libgloss/m68hc11/sim-valid-m68hc11.ld libgloss/m68hc11/sim-valid-m68hc12.ld libgloss/m68hc11/syscalls.c libgloss/m68k/Makefile.in libgloss/m68k/README libgloss/m68k/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/cfe.c libgloss/mips/cfe.ld libgloss/mips/cfe_api.c libgloss/mips/cfe_api.h libgloss/mips/cfe_api_int.h libgloss/mips/cfe_error.h libgloss/mips/cfe_mem.c libgloss/mips/cma101.c libgloss/mips/configure libgloss/mips/configure.in libgloss/mips/crt0.S libgloss/mips/crt0_cfe.S libgloss/mips/crt0_cygmon.S libgloss/mips/cygmon.c libgloss/mips/ddb-kseg0.ld libgloss/mips/ddb.ld libgloss/mips/dtor.C libgloss/mips/dve.ld libgloss/mips/dvemon.c libgloss/mips/entry.S libgloss/mips/idt.ld libgloss/mips/idt32.ld libgloss/mips/idt64.ld libgloss/mips/idtecoff.ld libgloss/mips/idtmon.S libgloss/mips/jmr3904-io.c libgloss/mips/jmr3904app-java.ld libgloss/mips/jmr3904app.ld libgloss/mips/jmr3904dram-java.ld libgloss/mips/jmr3904dram.ld libgloss/mips/lsi.ld libgloss/mips/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/asb2303.ld libgloss/mn10300/asb2305.ld libgloss/mn10300/chmod.c libgloss/mn10300/chown.c libgloss/mn10300/close.c libgloss/mn10300/configure libgloss/mn10300/configure.in libgloss/mn10300/creat.c libgloss/mn10300/crt0-eval.S libgloss/mn10300/crt0.S libgloss/mn10300/crt0_cygmon.S libgloss/mn10300/crt0_redboot.S libgloss/mn10300/crt1.c libgloss/mn10300/cygmon.c libgloss/mn10300/eval.ld libgloss/mn10300/execv.c libgloss/mn10300/execve.c libgloss/mn10300/fork.c libgloss/mn10300/fstat.c libgloss/mn10300/getpid.c libgloss/mn10300/gettime.c libgloss/mn10300/isatty.c libgloss/mn10300/kill.c libgloss/mn10300/lseek.c libgloss/mn10300/open.c libgloss/mn10300/pipe.c libgloss/mn10300/read.c libgloss/mn10300/sbrk.c libgloss/mn10300/sim.ld libgloss/mn10300/stat.c libgloss/mn10300/test.c libgloss/mn10300/time.c libgloss/mn10300/times.c libgloss/mn10300/trap.S libgloss/mn10300/trap.h libgloss/mn10300/unlink.c libgloss/mn10300/utime.c libgloss/mn10300/wait.c libgloss/mn10300/write.c libgloss/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-getrusage.S libgloss/rs6000/sim-inbyte.c libgloss/rs6000/sim-print.c libgloss/rs6000/sim-sbrk.c libgloss/rs6000/simulator.S libgloss/rs6000/sol-cfuncs.c libgloss/rs6000/sol-syscall.S libgloss/rs6000/test.c libgloss/rs6000/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/sim_rom.ld libgloss/xstormy16/stat.c libgloss/xstormy16/syscalls.S libgloss/xstormy16/syscalls.m4 libgloss/xstormy16/unlink.c libgloss/xstormy16/xstormy16_stub.c newlib/ChangeLog newlib/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/iconvdata/EUC-JP.irreversible newlib/iconvdata/Makefile.am newlib/iconvdata/Makefile.in newlib/iconvdata/SJIS.irreversible newlib/iconvdata/aclocal.m4 newlib/iconvdata/configure newlib/iconvdata/configure.in newlib/iconvdata/dummy.c newlib/iconvdata/euc-jp.c newlib/iconvdata/gconv-modules newlib/iconvdata/jis0201.c newlib/iconvdata/jis0201.h newlib/iconvdata/jis0208.c newlib/iconvdata/jis0208.h newlib/iconvdata/jis0212.c newlib/iconvdata/jis0212.h newlib/iconvdata/sjis.c newlib/libc/Makefile.am newlib/libc/Makefile.in newlib/libc/aclocal.m4 newlib/libc/argz/Makefile.am newlib/libc/argz/Makefile.in newlib/libc/argz/argz_add.c newlib/libc/argz/argz_add_sep.c newlib/libc/argz/argz_append.c newlib/libc/argz/argz_count.c newlib/libc/argz/argz_create.c newlib/libc/argz/argz_create_sep.c newlib/libc/argz/argz_delete.c newlib/libc/argz/argz_extract.c newlib/libc/argz/argz_insert.c newlib/libc/argz/argz_next.c newlib/libc/argz/argz_replace.c newlib/libc/argz/argz_stringify.c newlib/libc/argz/buf_findstr.c newlib/libc/argz/buf_findstr.h newlib/libc/argz/dummy.c newlib/libc/argz/envz_add.c newlib/libc/argz/envz_entry.c newlib/libc/argz/envz_get.c newlib/libc/argz/envz_merge.c newlib/libc/argz/envz_remove.c newlib/libc/argz/envz_strip.c newlib/libc/configure newlib/libc/configure.in newlib/libc/ctype/Makefile.am newlib/libc/ctype/Makefile.in newlib/libc/ctype/_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/isblank.c newlib/libc/ctype/iscntrl.c newlib/libc/ctype/isdigit.c newlib/libc/ctype/islower.c newlib/libc/ctype/isprint.c newlib/libc/ctype/ispunct.c newlib/libc/ctype/isspace.c newlib/libc/ctype/isupper.c newlib/libc/ctype/iswalnum.c newlib/libc/ctype/iswalpha.c newlib/libc/ctype/iswblank.c newlib/libc/ctype/iswcntrl.c newlib/libc/ctype/iswctype.c newlib/libc/ctype/iswdigit.c newlib/libc/ctype/iswgraph.c newlib/libc/ctype/iswlower.c newlib/libc/ctype/iswprint.c newlib/libc/ctype/iswpunct.c newlib/libc/ctype/iswspace.c newlib/libc/ctype/iswupper.c newlib/libc/ctype/iswxdigit.c newlib/libc/ctype/isxdigit.c newlib/libc/ctype/jp2uc.c newlib/libc/ctype/jp2uc.h newlib/libc/ctype/local.h newlib/libc/ctype/toascii.c newlib/libc/ctype/tolower.c newlib/libc/ctype/toupper.c newlib/libc/ctype/towctrans.c newlib/libc/ctype/towlower.c newlib/libc/ctype/towupper.c newlib/libc/ctype/utf8alpha.h newlib/libc/ctype/utf8print.h newlib/libc/ctype/utf8punct.h newlib/libc/ctype/wctrans.c newlib/libc/ctype/wctype.c newlib/libc/errno/Makefile.am newlib/libc/errno/Makefile.in newlib/libc/errno/errno.c newlib/libc/iconv/Makefile.am newlib/libc/iconv/Makefile.in newlib/libc/iconv/ccs/Makefile.am newlib/libc/iconv/ccs/Makefile.in newlib/libc/iconv/ccs/big5.c newlib/libc/iconv/ccs/binary/Makefile.am newlib/libc/iconv/ccs/binary/Makefile.in newlib/libc/iconv/ccs/binary/big5.cct newlib/libc/iconv/ccs/binary/cns11643_plane1.cct newlib/libc/iconv/ccs/binary/cns11643_plane14.cct newlib/libc/iconv/ccs/binary/cns11643_plane2.cct newlib/libc/iconv/ccs/binary/cp775.cct newlib/libc/iconv/ccs/binary/cp850.cct newlib/libc/iconv/ccs/binary/cp852.cct newlib/libc/iconv/ccs/binary/cp855.cct newlib/libc/iconv/ccs/binary/cp866.cct newlib/libc/iconv/ccs/binary/iso_8859_1.cct newlib/libc/iconv/ccs/binary/iso_8859_10.cct newlib/libc/iconv/ccs/binary/iso_8859_11.cct newlib/libc/iconv/ccs/binary/iso_8859_13.cct newlib/libc/iconv/ccs/binary/iso_8859_14.cct newlib/libc/iconv/ccs/binary/iso_8859_15.cct newlib/libc/iconv/ccs/binary/iso_8859_2.cct newlib/libc/iconv/ccs/binary/iso_8859_3.cct newlib/libc/iconv/ccs/binary/iso_8859_4.cct newlib/libc/iconv/ccs/binary/iso_8859_5.cct newlib/libc/iconv/ccs/binary/iso_8859_6.cct newlib/libc/iconv/ccs/binary/iso_8859_7.cct newlib/libc/iconv/ccs/binary/iso_8859_8.cct newlib/libc/iconv/ccs/binary/iso_8859_9.cct newlib/libc/iconv/ccs/binary/iso_ir_111.cct newlib/libc/iconv/ccs/binary/jis_x0201_1976.cct newlib/libc/iconv/ccs/binary/jis_x0208_1990.cct newlib/libc/iconv/ccs/binary/jis_x0212_1990.cct newlib/libc/iconv/ccs/binary/koi8_r.cct newlib/libc/iconv/ccs/binary/koi8_ru.cct newlib/libc/iconv/ccs/binary/koi8_u.cct newlib/libc/iconv/ccs/binary/koi8_uni.cct newlib/libc/iconv/ccs/binary/ksx1001.cct newlib/libc/iconv/ccs/binary/win_1250.cct newlib/libc/iconv/ccs/binary/win_1251.cct newlib/libc/iconv/ccs/binary/win_1252.cct newlib/libc/iconv/ccs/binary/win_1253.cct newlib/libc/iconv/ccs/binary/win_1254.cct newlib/libc/iconv/ccs/binary/win_1255.cct newlib/libc/iconv/ccs/binary/win_1256.cct newlib/libc/iconv/ccs/binary/win_1257.cct newlib/libc/iconv/ccs/binary/win_1258.cct newlib/libc/iconv/ccs/ccs.h newlib/libc/iconv/ccs/ccsbi.c newlib/libc/iconv/ccs/ccsbi.h newlib/libc/iconv/ccs/ccsnames.h newlib/libc/iconv/ccs/cns11643_plane1.c newlib/libc/iconv/ccs/cns11643_plane14.c newlib/libc/iconv/ccs/cns11643_plane2.c newlib/libc/iconv/ccs/cp775.c newlib/libc/iconv/ccs/cp850.c newlib/libc/iconv/ccs/cp852.c newlib/libc/iconv/ccs/cp855.c newlib/libc/iconv/ccs/cp866.c newlib/libc/iconv/ccs/iso_8859_1.c newlib/libc/iconv/ccs/iso_8859_10.c newlib/libc/iconv/ccs/iso_8859_11.c newlib/libc/iconv/ccs/iso_8859_13.c newlib/libc/iconv/ccs/iso_8859_14.c newlib/libc/iconv/ccs/iso_8859_15.c newlib/libc/iconv/ccs/iso_8859_2.c newlib/libc/iconv/ccs/iso_8859_3.c newlib/libc/iconv/ccs/iso_8859_4.c newlib/libc/iconv/ccs/iso_8859_5.c newlib/libc/iconv/ccs/iso_8859_6.c newlib/libc/iconv/ccs/iso_8859_7.c newlib/libc/iconv/ccs/iso_8859_8.c newlib/libc/iconv/ccs/iso_8859_9.c newlib/libc/iconv/ccs/iso_ir_111.c newlib/libc/iconv/ccs/jis_x0201_1976.c newlib/libc/iconv/ccs/jis_x0208_1990.c newlib/libc/iconv/ccs/jis_x0212_1990.c newlib/libc/iconv/ccs/koi8_r.c newlib/libc/iconv/ccs/koi8_ru.c newlib/libc/iconv/ccs/koi8_u.c newlib/libc/iconv/ccs/koi8_uni.c newlib/libc/iconv/ccs/ksx1001.c newlib/libc/iconv/ccs/mktbl.pl newlib/libc/iconv/ccs/win_1250.c newlib/libc/iconv/ccs/win_1251.c newlib/libc/iconv/ccs/win_1252.c newlib/libc/iconv/ccs/win_1253.c newlib/libc/iconv/ccs/win_1254.c newlib/libc/iconv/ccs/win_1255.c newlib/libc/iconv/ccs/win_1256.c newlib/libc/iconv/ccs/win_1257.c newlib/libc/iconv/ccs/win_1258.c newlib/libc/iconv/ces/Makefile.am newlib/libc/iconv/ces/Makefile.in newlib/libc/iconv/ces/cesbi.c newlib/libc/iconv/ces/cesbi.h newlib/libc/iconv/ces/cesdeps.h newlib/libc/iconv/ces/euc.c newlib/libc/iconv/ces/mkdeps.pl newlib/libc/iconv/ces/table-pcs.c newlib/libc/iconv/ces/table.c newlib/libc/iconv/ces/ucs-2-internal.c newlib/libc/iconv/ces/ucs-2.c newlib/libc/iconv/ces/ucs-4-internal.c newlib/libc/iconv/ces/ucs-4.c newlib/libc/iconv/ces/us-ascii.c newlib/libc/iconv/ces/utf-16.c newlib/libc/iconv/ces/utf-8.c newlib/libc/iconv/encoding.aliases newlib/libc/iconv/iconv.tex newlib/libc/iconv/lib/Makefile.am newlib/libc/iconv/lib/Makefile.in newlib/libc/iconv/lib/aliasesbi.c newlib/libc/iconv/lib/aliasesi.c newlib/libc/iconv/lib/conv.h newlib/libc/iconv/lib/encnames.h newlib/libc/iconv/lib/encoding.deps newlib/libc/iconv/lib/endian.h newlib/libc/iconv/lib/iconv.c newlib/libc/iconv/lib/iconvnls.c newlib/libc/iconv/lib/iconvnls.h newlib/libc/iconv/lib/local.h newlib/libc/iconv/lib/nullconv.c newlib/libc/iconv/lib/ucsconv.c newlib/libc/iconv/lib/ucsconv.h newlib/libc/include/_ansi.h newlib/libc/include/_syslist.h newlib/libc/include/alloca.h newlib/libc/include/ar.h newlib/libc/include/argz.h newlib/libc/include/assert.h newlib/libc/include/ctype.h newlib/libc/include/dirent.h newlib/libc/include/envz.h newlib/libc/include/errno.h newlib/libc/include/fastmath.h newlib/libc/include/fcntl.h newlib/libc/include/grp.h newlib/libc/include/iconv.h newlib/libc/include/ieeefp.h newlib/libc/include/langinfo.h newlib/libc/include/libgen.h newlib/libc/include/limits.h newlib/libc/include/locale.h newlib/libc/include/machine/_types.h newlib/libc/include/machine/ansi.h newlib/libc/include/machine/endian.h newlib/libc/include/machine/fastmath.h newlib/libc/include/machine/ieeefp.h newlib/libc/include/machine/malloc.h newlib/libc/include/machine/param.h newlib/libc/include/machine/setjmp-dj.h newlib/libc/include/machine/setjmp.h newlib/libc/include/machine/stdlib.h newlib/libc/include/machine/termios.h newlib/libc/include/machine/time.h newlib/libc/include/machine/types.h newlib/libc/include/malloc.h newlib/libc/include/math.h newlib/libc/include/newlib.h newlib/libc/include/paths.h newlib/libc/include/process.h newlib/libc/include/pthread.h newlib/libc/include/pwd.h newlib/libc/include/reent.h newlib/libc/include/regdef.h newlib/libc/include/search.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/cdefs.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/iconvnls.h newlib/libc/include/sys/lock.h newlib/libc/include/sys/param.h newlib/libc/include/sys/queue.h newlib/libc/include/sys/reent.h newlib/libc/include/sys/resource.h newlib/libc/include/sys/sched.h newlib/libc/include/sys/signal.h newlib/libc/include/sys/stat.h newlib/libc/include/sys/stdio.h newlib/libc/include/sys/string.h newlib/libc/include/sys/syslimits.h newlib/libc/include/sys/time.h newlib/libc/include/sys/timeb.h newlib/libc/include/sys/times.h newlib/libc/include/sys/types.h newlib/libc/include/sys/unistd.h newlib/libc/include/sys/utime.h newlib/libc/include/sys/wait.h newlib/libc/include/termios.h newlib/libc/include/time.h newlib/libc/include/unctrl.h newlib/libc/include/unistd.h newlib/libc/include/utime.h newlib/libc/include/utmp.h newlib/libc/include/wchar.h newlib/libc/include/wctype.h newlib/libc/libc.texinfo newlib/libc/locale/Makefile.am newlib/libc/locale/Makefile.in newlib/libc/locale/fix_grouping.c newlib/libc/locale/ldpart.c newlib/libc/locale/ldpart.h newlib/libc/locale/lmessages.c newlib/libc/locale/lmessages.h newlib/libc/locale/lmonetary.c newlib/libc/locale/lmonetary.h newlib/libc/locale/lnumeric.c newlib/libc/locale/lnumeric.h newlib/libc/locale/locale.c newlib/libc/locale/locale.tex newlib/libc/locale/nl_langinfo.3 newlib/libc/locale/nl_langinfo.c newlib/libc/locale/setlocale.h newlib/libc/locale/timelocal.c newlib/libc/locale/timelocal.h newlib/libc/machine/Makefile.am newlib/libc/machine/Makefile.in newlib/libc/machine/a29k/Makefile.am newlib/libc/machine/a29k/Makefile.in newlib/libc/machine/a29k/aclocal.m4 newlib/libc/machine/a29k/configure newlib/libc/machine/a29k/configure.in newlib/libc/machine/aclocal.m4 newlib/libc/machine/arm/Makefile.am newlib/libc/machine/arm/Makefile.in newlib/libc/machine/arm/access.c newlib/libc/machine/arm/aclocal.m4 newlib/libc/machine/arm/configure newlib/libc/machine/arm/configure.in newlib/libc/machine/arm/machine/endian.h newlib/libc/machine/arm/machine/param.h newlib/libc/machine/arm/setjmp.S newlib/libc/machine/configure newlib/libc/machine/configure.in newlib/libc/machine/cris/Makefile.am newlib/libc/machine/cris/Makefile.in newlib/libc/machine/cris/aclocal.m4 newlib/libc/machine/cris/configure newlib/libc/machine/cris/configure.in newlib/libc/machine/cris/include/pthread.h newlib/libc/machine/cris/libcdtor.c newlib/libc/machine/cris/memcpy.c newlib/libc/machine/cris/memmove.c newlib/libc/machine/cris/memset.c newlib/libc/machine/cris/setjmp.c newlib/libc/machine/cris/sys/errno.h newlib/libc/machine/cris/sys/fcntl.h newlib/libc/machine/cris/sys/signal.h newlib/libc/machine/crx/Makefile.am newlib/libc/machine/crx/Makefile.in newlib/libc/machine/crx/aclocal.m4 newlib/libc/machine/crx/configure newlib/libc/machine/crx/configure.in newlib/libc/machine/crx/getenv.c newlib/libc/machine/crx/setjmp.S newlib/libc/machine/crx/sys/asm.h newlib/libc/machine/crx/sys/libh.h newlib/libc/machine/crx/sys/syscall.h newlib/libc/machine/d10v/Makefile.am newlib/libc/machine/d10v/Makefile.in newlib/libc/machine/d10v/aclocal.m4 newlib/libc/machine/d10v/configure newlib/libc/machine/d10v/configure.in newlib/libc/machine/d10v/setjmp.S newlib/libc/machine/d30v/Makefile.am newlib/libc/machine/d30v/Makefile.in newlib/libc/machine/d30v/aclocal.m4 newlib/libc/machine/d30v/configure newlib/libc/machine/d30v/configure.in newlib/libc/machine/d30v/setjmp.S newlib/libc/machine/fr30/Makefile.am newlib/libc/machine/fr30/Makefile.in newlib/libc/machine/fr30/aclocal.m4 newlib/libc/machine/fr30/configure newlib/libc/machine/fr30/configure.in newlib/libc/machine/fr30/setjmp.S newlib/libc/machine/frv/Makefile.am newlib/libc/machine/frv/Makefile.in newlib/libc/machine/frv/aclocal.m4 newlib/libc/machine/frv/configure newlib/libc/machine/frv/configure.in newlib/libc/machine/frv/setjmp.S newlib/libc/machine/h8300/Makefile.am newlib/libc/machine/h8300/Makefile.in newlib/libc/machine/h8300/aclocal.m4 newlib/libc/machine/h8300/configure newlib/libc/machine/h8300/configure.in newlib/libc/machine/h8300/defines.h newlib/libc/machine/h8300/h8sx_strcpy.S newlib/libc/machine/h8300/memcpy.S newlib/libc/machine/h8300/memset.S newlib/libc/machine/h8300/reg_memcpy.S newlib/libc/machine/h8300/reg_memset.S newlib/libc/machine/h8300/setarch.h newlib/libc/machine/h8300/setjmp.S newlib/libc/machine/h8300/strcmp.S newlib/libc/machine/h8500/Makefile.am newlib/libc/machine/h8500/Makefile.in newlib/libc/machine/h8500/aclocal.m4 newlib/libc/machine/h8500/cmpsi.c newlib/libc/machine/h8500/configure newlib/libc/machine/h8500/configure.in newlib/libc/machine/h8500/divhi3.S newlib/libc/machine/h8500/divsi3.c newlib/libc/machine/h8500/mulhi3.c newlib/libc/machine/h8500/mulsi3.c newlib/libc/machine/h8500/negsi2.c newlib/libc/machine/h8500/psi.S newlib/libc/machine/h8500/setjmp.S newlib/libc/machine/h8500/shifts.c newlib/libc/machine/hppa/DEFS.h newlib/libc/machine/hppa/Makefile.am newlib/libc/machine/hppa/Makefile.in newlib/libc/machine/hppa/aclocal.m4 newlib/libc/machine/hppa/configure newlib/libc/machine/hppa/configure.in newlib/libc/machine/hppa/memchr.S newlib/libc/machine/hppa/memcmp.S newlib/libc/machine/hppa/memcpy.S newlib/libc/machine/hppa/memset.S newlib/libc/machine/hppa/pcc_prefix.s newlib/libc/machine/hppa/setjmp.S newlib/libc/machine/hppa/strcat.S newlib/libc/machine/hppa/strcmp.S newlib/libc/machine/hppa/strcpy.S newlib/libc/machine/hppa/strlen.S newlib/libc/machine/hppa/strncat.S newlib/libc/machine/hppa/strncmp.S newlib/libc/machine/hppa/strncpy.S newlib/libc/machine/i386/Makefile.am newlib/libc/machine/i386/Makefile.in newlib/libc/machine/i386/aclocal.m4 newlib/libc/machine/i386/configure newlib/libc/machine/i386/configure.in newlib/libc/machine/i386/f_atan2.S newlib/libc/machine/i386/f_atan2f.S newlib/libc/machine/i386/f_exp.c newlib/libc/machine/i386/f_expf.c newlib/libc/machine/i386/f_frexp.S newlib/libc/machine/i386/f_frexpf.S newlib/libc/machine/i386/f_ldexp.S newlib/libc/machine/i386/f_ldexpf.S newlib/libc/machine/i386/f_log.S newlib/libc/machine/i386/f_log10.S newlib/libc/machine/i386/f_log10f.S newlib/libc/machine/i386/f_logf.S newlib/libc/machine/i386/f_math.h newlib/libc/machine/i386/f_pow.c newlib/libc/machine/i386/f_powf.c newlib/libc/machine/i386/f_tan.S newlib/libc/machine/i386/f_tanf.S newlib/libc/machine/i386/i386mach.h newlib/libc/machine/i386/memchr.S newlib/libc/machine/i386/memcmp.S newlib/libc/machine/i386/memcpy.S newlib/libc/machine/i386/memmove.S newlib/libc/machine/i386/memset.S newlib/libc/machine/i386/setjmp.S newlib/libc/machine/i386/strchr.S newlib/libc/machine/i386/strlen.S newlib/libc/machine/i960/Makefile.am newlib/libc/machine/i960/Makefile.in newlib/libc/machine/i960/aclocal.m4 newlib/libc/machine/i960/configure newlib/libc/machine/i960/configure.in newlib/libc/machine/i960/memccpy.S newlib/libc/machine/i960/memccpy_ca.S newlib/libc/machine/i960/memchr.S newlib/libc/machine/i960/memchr_ca.S newlib/libc/machine/i960/memcmp.S newlib/libc/machine/i960/memcmp_ca.S newlib/libc/machine/i960/memcpy.S newlib/libc/machine/i960/memcpy_ca.S newlib/libc/machine/i960/memset.S newlib/libc/machine/i960/setjmp.S newlib/libc/machine/i960/strchr.S newlib/libc/machine/i960/strchr_ca.S newlib/libc/machine/i960/strcmp.S newlib/libc/machine/i960/strcmp_ca.S newlib/libc/machine/i960/strcpy.S newlib/libc/machine/i960/strcpy_ca.S newlib/libc/machine/i960/strcspn.S newlib/libc/machine/i960/strdup.S newlib/libc/machine/i960/strlen.S newlib/libc/machine/i960/strlen_ca.S newlib/libc/machine/i960/strncat.S newlib/libc/machine/i960/strncat_ca.S newlib/libc/machine/i960/strncmp.S newlib/libc/machine/i960/strncmp_ca.S newlib/libc/machine/i960/strncpy.S newlib/libc/machine/i960/strncpy_ca.S newlib/libc/machine/i960/strpbrk.S newlib/libc/machine/i960/strrchr.S newlib/libc/machine/iq2000/Makefile.am newlib/libc/machine/iq2000/Makefile.in newlib/libc/machine/iq2000/aclocal.m4 newlib/libc/machine/iq2000/configure newlib/libc/machine/iq2000/configure.in newlib/libc/machine/iq2000/setjmp.S newlib/libc/machine/m32r/Makefile.am newlib/libc/machine/m32r/Makefile.in newlib/libc/machine/m32r/aclocal.m4 newlib/libc/machine/m32r/configure newlib/libc/machine/m32r/configure.in newlib/libc/machine/m32r/setjmp.S newlib/libc/machine/m68hc11/Makefile.am newlib/libc/machine/m68hc11/Makefile.in newlib/libc/machine/m68hc11/aclocal.m4 newlib/libc/machine/m68hc11/configure newlib/libc/machine/m68hc11/configure.in newlib/libc/machine/m68hc11/setjmp.S newlib/libc/machine/m68k/Makefile.am newlib/libc/machine/m68k/Makefile.in newlib/libc/machine/m68k/aclocal.m4 newlib/libc/machine/m68k/configure newlib/libc/machine/m68k/configure.in newlib/libc/machine/m68k/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/memcpy.c newlib/libc/machine/mips/memset.c newlib/libc/machine/mips/setjmp.S newlib/libc/machine/mips/strcmp.c newlib/libc/machine/mips/strlen.c newlib/libc/machine/mips/strncpy.c newlib/libc/machine/mn10200/Makefile.am newlib/libc/machine/mn10200/Makefile.in newlib/libc/machine/mn10200/aclocal.m4 newlib/libc/machine/mn10200/configure newlib/libc/machine/mn10200/configure.in newlib/libc/machine/mn10200/setjmp.S newlib/libc/machine/mn10300/Makefile.am newlib/libc/machine/mn10300/Makefile.in newlib/libc/machine/mn10300/aclocal.m4 newlib/libc/machine/mn10300/configure newlib/libc/machine/mn10300/configure.in newlib/libc/machine/mn10300/memchr.S newlib/libc/machine/mn10300/memcmp.S newlib/libc/machine/mn10300/memcpy.S newlib/libc/machine/mn10300/memset.S newlib/libc/machine/mn10300/setjmp.S newlib/libc/machine/mn10300/strchr.S newlib/libc/machine/mn10300/strcmp.S newlib/libc/machine/mn10300/strcpy.S newlib/libc/machine/mn10300/strlen.S newlib/libc/machine/necv70/Makefile.am newlib/libc/machine/necv70/Makefile.in newlib/libc/machine/necv70/aclocal.m4 newlib/libc/machine/necv70/configure newlib/libc/machine/necv70/configure.in newlib/libc/machine/necv70/fastmath.s newlib/libc/machine/necv70/machine/registers.h newlib/libc/machine/necv70/necv70.tex newlib/libc/machine/necv70/setjmp.s newlib/libc/machine/powerpc/Makefile.am newlib/libc/machine/powerpc/Makefile.in newlib/libc/machine/powerpc/aclocal.m4 newlib/libc/machine/powerpc/atosfix16.c newlib/libc/machine/powerpc/atosfix32.c newlib/libc/machine/powerpc/atosfix64.c newlib/libc/machine/powerpc/atoufix16.c newlib/libc/machine/powerpc/atoufix32.c newlib/libc/machine/powerpc/atoufix64.c newlib/libc/machine/powerpc/configure newlib/libc/machine/powerpc/configure.in newlib/libc/machine/powerpc/fix64.h newlib/libc/machine/powerpc/machine/malloc.h newlib/libc/machine/powerpc/machine/stdlib.h newlib/libc/machine/powerpc/setjmp.S newlib/libc/machine/powerpc/simdldtoa.c newlib/libc/machine/powerpc/strtosfix16.c newlib/libc/machine/powerpc/strtosfix32.c newlib/libc/machine/powerpc/strtosfix64.c newlib/libc/machine/powerpc/strtoufix16.c newlib/libc/machine/powerpc/strtoufix32.c newlib/libc/machine/powerpc/strtoufix64.c newlib/libc/machine/powerpc/times.c newlib/libc/machine/powerpc/ufix64toa.c newlib/libc/machine/powerpc/vec_calloc.c newlib/libc/machine/powerpc/vec_free.c newlib/libc/machine/powerpc/vec_malloc.c newlib/libc/machine/powerpc/vec_mallocr.c newlib/libc/machine/powerpc/vec_realloc.c newlib/libc/machine/powerpc/vfprintf.c newlib/libc/machine/powerpc/vfscanf.c newlib/libc/machine/sh/Makefile.am newlib/libc/machine/sh/Makefile.in newlib/libc/machine/sh/aclocal.m4 newlib/libc/machine/sh/asm.h newlib/libc/machine/sh/configure newlib/libc/machine/sh/configure.in newlib/libc/machine/sh/memcpy.S newlib/libc/machine/sh/memset.S newlib/libc/machine/sh/setjmp.S newlib/libc/machine/sh/strcmp.S newlib/libc/machine/sh/strcpy.S newlib/libc/machine/sh/strlen.S newlib/libc/machine/sh/strncpy.S newlib/libc/machine/sparc/Makefile.am newlib/libc/machine/sparc/Makefile.in newlib/libc/machine/sparc/aclocal.m4 newlib/libc/machine/sparc/configure newlib/libc/machine/sparc/configure.in newlib/libc/machine/sparc/machine/sparclet.h newlib/libc/machine/sparc/scan.c newlib/libc/machine/sparc/setjmp.S newlib/libc/machine/sparc/shuffle.c newlib/libc/machine/tic4x/Makefile.am newlib/libc/machine/tic4x/Makefile.in newlib/libc/machine/tic4x/aclocal.m4 newlib/libc/machine/tic4x/configure newlib/libc/machine/tic4x/configure.in newlib/libc/machine/tic4x/setjmp.S newlib/libc/machine/tic80/Makefile.am newlib/libc/machine/tic80/Makefile.in newlib/libc/machine/tic80/aclocal.m4 newlib/libc/machine/tic80/configure newlib/libc/machine/tic80/configure.in newlib/libc/machine/tic80/setjmp.S newlib/libc/machine/v850/Makefile.am newlib/libc/machine/v850/Makefile.in newlib/libc/machine/v850/aclocal.m4 newlib/libc/machine/v850/configure newlib/libc/machine/v850/configure.in newlib/libc/machine/v850/setjmp.S newlib/libc/machine/w65/Makefile.am newlib/libc/machine/w65/Makefile.in newlib/libc/machine/w65/aclocal.m4 newlib/libc/machine/w65/cmpsi.c newlib/libc/machine/w65/configure newlib/libc/machine/w65/configure.in newlib/libc/machine/w65/divsi3.c newlib/libc/machine/w65/lshrhi.s newlib/libc/machine/w65/mulsi3.c newlib/libc/machine/w65/sdivhi3.s newlib/libc/machine/w65/smulhi3.s newlib/libc/machine/w65/udivhi3.s newlib/libc/machine/w65/umodhi3.s newlib/libc/machine/xscale/Makefile.am newlib/libc/machine/xscale/Makefile.in newlib/libc/machine/xscale/aclocal.m4 newlib/libc/machine/xscale/configure newlib/libc/machine/xscale/configure.in newlib/libc/machine/xscale/machine/profile.h newlib/libc/machine/xscale/memchr.c newlib/libc/machine/xscale/memcmp.c newlib/libc/machine/xscale/memcpy.c newlib/libc/machine/xscale/memmove.c newlib/libc/machine/xscale/memset.c newlib/libc/machine/xscale/setjmp.S newlib/libc/machine/xscale/strchr.c newlib/libc/machine/xscale/strcmp.c newlib/libc/machine/xscale/strcpy.c newlib/libc/machine/xscale/strlen.c newlib/libc/machine/xscale/xscale.h newlib/libc/machine/xstormy16/Makefile.am newlib/libc/machine/xstormy16/Makefile.in newlib/libc/machine/xstormy16/aclocal.m4 newlib/libc/machine/xstormy16/configure newlib/libc/machine/xstormy16/configure.in newlib/libc/machine/xstormy16/mallocr.c newlib/libc/machine/xstormy16/setjmp.S newlib/libc/machine/xstormy16/tiny-malloc.c newlib/libc/machine/z8k/Makefile.am newlib/libc/machine/z8k/Makefile.in newlib/libc/machine/z8k/aclocal.m4 newlib/libc/machine/z8k/args.h newlib/libc/machine/z8k/configure newlib/libc/machine/z8k/configure.in newlib/libc/machine/z8k/memcmp.S newlib/libc/machine/z8k/memcpy.S newlib/libc/machine/z8k/memmove.S newlib/libc/machine/z8k/memset.S newlib/libc/machine/z8k/setjmp.S newlib/libc/misc/Makefile.am newlib/libc/misc/Makefile.in newlib/libc/misc/dprintf.c newlib/libc/misc/ffs.c newlib/libc/misc/init.c newlib/libc/misc/misc.tex newlib/libc/misc/unctrl.c newlib/libc/posix/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/readdir_r.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/fcntlr.c newlib/libc/reent/fstat64r.c newlib/libc/reent/fstatr.c newlib/libc/reent/getreent.c newlib/libc/reent/impure.c newlib/libc/reent/linkr.c newlib/libc/reent/lseek64r.c newlib/libc/reent/lseekr.c newlib/libc/reent/open64r.c newlib/libc/reent/openr.c newlib/libc/reent/readr.c newlib/libc/reent/reent.c newlib/libc/reent/reent.tex newlib/libc/reent/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/search/Makefile.am newlib/libc/search/Makefile.in newlib/libc/search/bsearch.c newlib/libc/search/db_local.h newlib/libc/search/extern.h newlib/libc/search/hash.c newlib/libc/search/hash.h newlib/libc/search/hash_bigkey.c newlib/libc/search/hash_buf.c newlib/libc/search/hash_func.c newlib/libc/search/hash_log2.c newlib/libc/search/hash_page.c newlib/libc/search/hcreate.3 newlib/libc/search/hcreate.c newlib/libc/search/hcreate_r.c newlib/libc/search/page.h newlib/libc/search/qsort.c newlib/libc/search/tdelete.c newlib/libc/search/tdestroy.c newlib/libc/search/tfind.c newlib/libc/search/tsearch.3 newlib/libc/search/tsearch.c newlib/libc/search/twalk.c newlib/libc/signal/Makefile.am newlib/libc/signal/Makefile.in newlib/libc/signal/raise.c newlib/libc/signal/signal.c newlib/libc/signal/signal.tex newlib/libc/stdio/Makefile.am newlib/libc/stdio/Makefile.in newlib/libc/stdio/asiprintf.c newlib/libc/stdio/asprintf.c newlib/libc/stdio/clearerr.c newlib/libc/stdio/fclose.c newlib/libc/stdio/fcloseall.c newlib/libc/stdio/fdopen.c newlib/libc/stdio/feof.c newlib/libc/stdio/ferror.c newlib/libc/stdio/fflush.c newlib/libc/stdio/fgetc.c newlib/libc/stdio/fgetpos.c newlib/libc/stdio/fgets.c newlib/libc/stdio/fileno.c newlib/libc/stdio/findfp.c newlib/libc/stdio/fiprintf.c newlib/libc/stdio/fiscanf.c newlib/libc/stdio/flags.c newlib/libc/stdio/floatio.h newlib/libc/stdio/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/fseeko.c newlib/libc/stdio/fsetpos.c newlib/libc/stdio/ftell.c newlib/libc/stdio/ftello.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/getc_u.c newlib/libc/stdio/getchar.c newlib/libc/stdio/getchar_u.c newlib/libc/stdio/getdelim.c newlib/libc/stdio/getline.c newlib/libc/stdio/gets.c newlib/libc/stdio/getw.c newlib/libc/stdio/iprintf.c newlib/libc/stdio/iscanf.c newlib/libc/stdio/local.h newlib/libc/stdio/makebuf.c newlib/libc/stdio/mktemp.c newlib/libc/stdio/perror.c newlib/libc/stdio/printf.c newlib/libc/stdio/putc.c newlib/libc/stdio/putc_u.c newlib/libc/stdio/putchar.c newlib/libc/stdio/putchar_u.c newlib/libc/stdio/puts.c newlib/libc/stdio/putw.c newlib/libc/stdio/refill.c newlib/libc/stdio/remove.c newlib/libc/stdio/rename.c newlib/libc/stdio/rewind.c newlib/libc/stdio/rget.c newlib/libc/stdio/scanf.c newlib/libc/stdio/sccl.c newlib/libc/stdio/setbuf.c newlib/libc/stdio/setbuffer.c newlib/libc/stdio/setlinebuf.c newlib/libc/stdio/setvbuf.c newlib/libc/stdio/siprintf.c newlib/libc/stdio/siscanf.c newlib/libc/stdio/sniprintf.c newlib/libc/stdio/snprintf.c newlib/libc/stdio/sprintf.c newlib/libc/stdio/sscanf.c newlib/libc/stdio/stdio.c newlib/libc/stdio/stdio.tex newlib/libc/stdio/tmpfile.c newlib/libc/stdio/tmpnam.c newlib/libc/stdio/ungetc.c newlib/libc/stdio/vasiprintf.c newlib/libc/stdio/vasprintf.c newlib/libc/stdio/vfieeefp.h newlib/libc/stdio/vfprintf.c newlib/libc/stdio/vfscanf.c newlib/libc/stdio/viprintf.c newlib/libc/stdio/viscanf.c newlib/libc/stdio/vprintf.c newlib/libc/stdio/vscanf.c newlib/libc/stdio/vsiprintf.c newlib/libc/stdio/vsiscanf.c newlib/libc/stdio/vsniprintf.c newlib/libc/stdio/vsnprintf.c newlib/libc/stdio/vsprintf.c newlib/libc/stdio/vsscanf.c newlib/libc/stdio/wbuf.c newlib/libc/stdio/wsetup.c newlib/libc/stdio64/Makefile.am newlib/libc/stdio64/Makefile.in newlib/libc/stdio64/dummy.c newlib/libc/stdio64/fdopen64.c newlib/libc/stdio64/fgetpos64.c newlib/libc/stdio64/fopen64.c newlib/libc/stdio64/freopen64.c newlib/libc/stdio64/fseeko64.c newlib/libc/stdio64/fsetpos64.c newlib/libc/stdio64/ftello64.c newlib/libc/stdio64/local64.h newlib/libc/stdio64/stdio64.c newlib/libc/stdio64/stdio64.tex newlib/libc/stdio64/tmpfile64.c newlib/libc/stdlib/Makefile.am newlib/libc/stdlib/Makefile.in newlib/libc/stdlib/_Exit.c newlib/libc/stdlib/__adjust.c newlib/libc/stdlib/__atexit.c newlib/libc/stdlib/__call_atexit.c newlib/libc/stdlib/__exp10.c newlib/libc/stdlib/__ten_mu.c newlib/libc/stdlib/a64l.c newlib/libc/stdlib/abort.c newlib/libc/stdlib/abs.c newlib/libc/stdlib/assert.c newlib/libc/stdlib/atexit.c newlib/libc/stdlib/atexit.h newlib/libc/stdlib/atof.c newlib/libc/stdlib/atoff.c newlib/libc/stdlib/atoi.c newlib/libc/stdlib/atol.c newlib/libc/stdlib/atoll.c newlib/libc/stdlib/btowc.c newlib/libc/stdlib/calloc.c newlib/libc/stdlib/cxa_atexit.c newlib/libc/stdlib/cxa_finalize.c newlib/libc/stdlib/div.c newlib/libc/stdlib/drand48.c newlib/libc/stdlib/dtoa.c newlib/libc/stdlib/dtoastub.c newlib/libc/stdlib/ecvtbuf.c newlib/libc/stdlib/efgcvt.c newlib/libc/stdlib/environ.c newlib/libc/stdlib/envlock.c newlib/libc/stdlib/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/getsubopt.3 newlib/libc/stdlib/getsubopt.c newlib/libc/stdlib/jrand48.c newlib/libc/stdlib/l64a.c newlib/libc/stdlib/labs.c newlib/libc/stdlib/lcong48.c newlib/libc/stdlib/ldiv.c newlib/libc/stdlib/ldtoa.c newlib/libc/stdlib/llabs.c newlib/libc/stdlib/lldiv.c newlib/libc/stdlib/local.h newlib/libc/stdlib/lrand48.c newlib/libc/stdlib/malign.c newlib/libc/stdlib/malloc.c newlib/libc/stdlib/mallocr.c newlib/libc/stdlib/mbctype.h newlib/libc/stdlib/mblen.c newlib/libc/stdlib/mblen_r.c newlib/libc/stdlib/mbrlen.c newlib/libc/stdlib/mbrtowc.c newlib/libc/stdlib/mbsinit.c newlib/libc/stdlib/mbsrtowcs.c newlib/libc/stdlib/mbstowcs.c newlib/libc/stdlib/mbstowcs_r.c newlib/libc/stdlib/mbtowc.c newlib/libc/stdlib/mbtowc_r.c newlib/libc/stdlib/mlock.c newlib/libc/stdlib/mprec.c newlib/libc/stdlib/mprec.h newlib/libc/stdlib/mrand48.c newlib/libc/stdlib/msize.c newlib/libc/stdlib/mstats.c newlib/libc/stdlib/mtrim.c newlib/libc/stdlib/nrand48.c newlib/libc/stdlib/on_exit.c newlib/libc/stdlib/putenv.c newlib/libc/stdlib/putenv_r.c newlib/libc/stdlib/rand.c newlib/libc/stdlib/rand48.c newlib/libc/stdlib/rand48.h newlib/libc/stdlib/rand_r.c newlib/libc/stdlib/realloc.c newlib/libc/stdlib/seed48.c newlib/libc/stdlib/setenv.c newlib/libc/stdlib/setenv_r.c newlib/libc/stdlib/srand48.c newlib/libc/stdlib/std.h newlib/libc/stdlib/stdlib.tex newlib/libc/stdlib/strtod.c newlib/libc/stdlib/strtol.c newlib/libc/stdlib/strtoll.c newlib/libc/stdlib/strtoll_r.c newlib/libc/stdlib/strtoul.c newlib/libc/stdlib/strtoull.c newlib/libc/stdlib/strtoull_r.c newlib/libc/stdlib/system.c newlib/libc/stdlib/valloc.c newlib/libc/stdlib/wcrtomb.c newlib/libc/stdlib/wcsrtombs.c newlib/libc/stdlib/wcstombs.c newlib/libc/stdlib/wcstombs_r.c newlib/libc/stdlib/wctob.c newlib/libc/stdlib/wctomb.c newlib/libc/stdlib/wctomb_r.c newlib/libc/string/Makefile.am newlib/libc/string/Makefile.in newlib/libc/string/bcmp.c newlib/libc/string/bcopy.c newlib/libc/string/bzero.c newlib/libc/string/index.c newlib/libc/string/memccpy.c newlib/libc/string/memchr.c newlib/libc/string/memcmp.c newlib/libc/string/memcpy.c newlib/libc/string/memmove.c newlib/libc/string/mempcpy.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/strdup.c newlib/libc/string/strdup_r.c newlib/libc/string/strerror.c newlib/libc/string/strerror_r.c newlib/libc/string/strings.tex newlib/libc/string/strlcat.c newlib/libc/string/strlcpy.c newlib/libc/string/strlen.c newlib/libc/string/strlwr.c newlib/libc/string/strncasecmp.c newlib/libc/string/strncat.c newlib/libc/string/strncmp.c newlib/libc/string/strncpy.c newlib/libc/string/strndup.c newlib/libc/string/strndup_r.c newlib/libc/string/strnlen.c newlib/libc/string/strpbrk.c newlib/libc/string/strrchr.c newlib/libc/string/strsep.c newlib/libc/string/strspn.c newlib/libc/string/strstr.c newlib/libc/string/strtok.c newlib/libc/string/strtok_r.c newlib/libc/string/strupr.c newlib/libc/string/strxfrm.c newlib/libc/string/swab.c newlib/libc/string/u_strerr.c newlib/libc/string/wcscat.c newlib/libc/string/wcschr.c newlib/libc/string/wcscmp.c newlib/libc/string/wcscoll.c newlib/libc/string/wcscpy.c newlib/libc/string/wcscspn.c newlib/libc/string/wcslcat.c newlib/libc/string/wcslcpy.c newlib/libc/string/wcslen.c newlib/libc/string/wcsncat.c newlib/libc/string/wcsncmp.c newlib/libc/string/wcsncpy.c newlib/libc/string/wcsnlen.c newlib/libc/string/wcspbrk.c newlib/libc/string/wcsrchr.c newlib/libc/string/wcsspn.c newlib/libc/string/wcsstr.c newlib/libc/string/wcstrings.tex newlib/libc/string/wcswidth.c newlib/libc/string/wcwidth.c newlib/libc/string/wmemchr.c newlib/libc/string/wmemcmp.c newlib/libc/string/wmemcpy.c newlib/libc/string/wmemmove.c newlib/libc/string/wmemset.c newlib/libc/sys.tex newlib/libc/sys/Makefile.am newlib/libc/sys/Makefile.in newlib/libc/sys/a29khif/Makefile.am newlib/libc/sys/a29khif/Makefile.in newlib/libc/sys/a29khif/_alloc.s newlib/libc/sys/a29khif/_close.s newlib/libc/sys/a29khif/_cycles.s newlib/libc/sys/a29khif/_exit.s newlib/libc/sys/a29khif/_fstat.s newlib/libc/sys/a29khif/_getpsiz.s newlib/libc/sys/a29khif/_gettz.s newlib/libc/sys/a29khif/_ioctl.s newlib/libc/sys/a29khif/_iostat.s newlib/libc/sys/a29khif/_iowait.s newlib/libc/sys/a29khif/_isatty.s newlib/libc/sys/a29khif/_lseek.s newlib/libc/sys/a29khif/_open.s newlib/libc/sys/a29khif/_query.s newlib/libc/sys/a29khif/_read.s newlib/libc/sys/a29khif/_sbrk.s newlib/libc/sys/a29khif/_setim.s newlib/libc/sys/a29khif/_settrap.s newlib/libc/sys/a29khif/_setvec.s newlib/libc/sys/a29khif/_tmpnam.s newlib/libc/sys/a29khif/_write.s newlib/libc/sys/a29khif/aclocal.m4 newlib/libc/sys/a29khif/alloc.s newlib/libc/sys/a29khif/clock.s newlib/libc/sys/a29khif/configure newlib/libc/sys/a29khif/configure.in newlib/libc/sys/a29khif/crt0.s newlib/libc/sys/a29khif/getargs.s newlib/libc/sys/a29khif/getenv.s newlib/libc/sys/a29khif/getpid.c newlib/libc/sys/a29khif/kill.c newlib/libc/sys/a29khif/read.s newlib/libc/sys/a29khif/remove.s newlib/libc/sys/a29khif/rename.s newlib/libc/sys/a29khif/signal.s newlib/libc/sys/a29khif/stubs.s newlib/libc/sys/a29khif/sys/cpudef.h newlib/libc/sys/a29khif/sys/fpsymbol.h newlib/libc/sys/a29khif/sys/intrinsi.h newlib/libc/sys/a29khif/sys/macros.h newlib/libc/sys/a29khif/sys/proreg.h newlib/libc/sys/a29khif/sys/romdcl.h newlib/libc/sys/a29khif/sys/smartmac.h newlib/libc/sys/a29khif/sys/sysmac.h newlib/libc/sys/a29khif/systime.s newlib/libc/sys/a29khif/vec.s newlib/libc/sys/aclocal.m4 newlib/libc/sys/arc/Makefile.am newlib/libc/sys/arc/Makefile.in newlib/libc/sys/arc/aclocal.m4 newlib/libc/sys/arc/configure newlib/libc/sys/arc/configure.in newlib/libc/sys/arc/crt0.S newlib/libc/sys/arc/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/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/d10v/Makefile.am newlib/libc/sys/d10v/Makefile.in newlib/libc/sys/d10v/aclocal.m4 newlib/libc/sys/d10v/configure newlib/libc/sys/d10v/configure.in newlib/libc/sys/d10v/creat.c newlib/libc/sys/d10v/crt0.S newlib/libc/sys/d10v/sys/syscall.h newlib/libc/sys/d10v/syscalls.c newlib/libc/sys/d10v/trap.S newlib/libc/sys/decstation/Makefile.am newlib/libc/sys/decstation/Makefile.in newlib/libc/sys/decstation/_main.c newlib/libc/sys/decstation/aclocal.m4 newlib/libc/sys/decstation/configure newlib/libc/sys/decstation/configure.in newlib/libc/sys/decstation/sys/dirent.h newlib/libc/sys/h8300hms/Makefile.am newlib/libc/sys/h8300hms/Makefile.in newlib/libc/sys/h8300hms/_exit.S newlib/libc/sys/h8300hms/aclocal.m4 newlib/libc/sys/h8300hms/close.S newlib/libc/sys/h8300hms/configure newlib/libc/sys/h8300hms/configure.in newlib/libc/sys/h8300hms/crt0.S newlib/libc/sys/h8300hms/crt1.c newlib/libc/sys/h8300hms/fstat.S newlib/libc/sys/h8300hms/lseek.S newlib/libc/sys/h8300hms/misc.c newlib/libc/sys/h8300hms/open.S newlib/libc/sys/h8300hms/read.S newlib/libc/sys/h8300hms/sbrk.c newlib/libc/sys/h8300hms/setarch.h newlib/libc/sys/h8300hms/stat.S newlib/libc/sys/h8300hms/sys/file.h newlib/libc/sys/h8300hms/sys/syscall.h newlib/libc/sys/h8300hms/syscalls.c newlib/libc/sys/h8300hms/write.S newlib/libc/sys/h8500hms/Makefile.am newlib/libc/sys/h8500hms/Makefile.in newlib/libc/sys/h8500hms/aclocal.m4 newlib/libc/sys/h8500hms/configure newlib/libc/sys/h8500hms/configure.in newlib/libc/sys/h8500hms/crt0.c newlib/libc/sys/h8500hms/misc.c newlib/libc/sys/h8500hms/syscalls.c newlib/libc/sys/linux/Makefile.am newlib/libc/sys/linux/Makefile.in newlib/libc/sys/linux/aclocal.m4 newlib/libc/sys/linux/aio.c newlib/libc/sys/linux/aio64.c newlib/libc/sys/linux/argp/Makefile.am newlib/libc/sys/linux/argp/Makefile.in newlib/libc/sys/linux/argp/argp-ba.c newlib/libc/sys/linux/argp/argp-eexst.c newlib/libc/sys/linux/argp/argp-fmtstream.c newlib/libc/sys/linux/argp/argp-fmtstream.h newlib/libc/sys/linux/argp/argp-fs-xinl.c newlib/libc/sys/linux/argp/argp-help.c newlib/libc/sys/linux/argp/argp-namefrob.h newlib/libc/sys/linux/argp/argp-parse.c newlib/libc/sys/linux/argp/argp-pv.c newlib/libc/sys/linux/argp/argp-pvh.c newlib/libc/sys/linux/argp/argp-xinl.c newlib/libc/sys/linux/bp-checks.h newlib/libc/sys/linux/brk.c newlib/libc/sys/linux/calloc.c newlib/libc/sys/linux/callocr.c newlib/libc/sys/linux/cfreer.c newlib/libc/sys/linux/cfspeed.c newlib/libc/sys/linux/clock_getres.c newlib/libc/sys/linux/clock_gettime.c newlib/libc/sys/linux/clock_settime.c newlib/libc/sys/linux/cmath/Makefile.am newlib/libc/sys/linux/cmath/Makefile.in newlib/libc/sys/linux/cmath/math_private.h newlib/libc/sys/linux/cmath/s_cacos.c newlib/libc/sys/linux/cmath/s_cacosf.c newlib/libc/sys/linux/cmath/s_cacosh.c newlib/libc/sys/linux/cmath/s_cacoshf.c newlib/libc/sys/linux/cmath/s_cacoshl.c newlib/libc/sys/linux/cmath/s_cacosl.c newlib/libc/sys/linux/cmath/s_casin.c newlib/libc/sys/linux/cmath/s_casinf.c newlib/libc/sys/linux/cmath/s_casinh.c newlib/libc/sys/linux/cmath/s_casinhf.c newlib/libc/sys/linux/cmath/s_casinhl.c newlib/libc/sys/linux/cmath/s_casinl.c newlib/libc/sys/linux/cmath/s_catan.c newlib/libc/sys/linux/cmath/s_catanf.c newlib/libc/sys/linux/cmath/s_catanh.c newlib/libc/sys/linux/cmath/s_catanhf.c newlib/libc/sys/linux/cmath/s_catanhl.c newlib/libc/sys/linux/cmath/s_catanl.c newlib/libc/sys/linux/cmath/s_cbrtl.c newlib/libc/sys/linux/cmath/s_ccos.c newlib/libc/sys/linux/cmath/s_ccosf.c newlib/libc/sys/linux/cmath/s_ccosh.c newlib/libc/sys/linux/cmath/s_ccoshf.c newlib/libc/sys/linux/cmath/s_ccoshl.c newlib/libc/sys/linux/cmath/s_ccosl.c newlib/libc/sys/linux/cmath/s_cexp.c newlib/libc/sys/linux/cmath/s_cexpf.c newlib/libc/sys/linux/cmath/s_cexpl.c newlib/libc/sys/linux/cmath/s_clog.c newlib/libc/sys/linux/cmath/s_clog10.c newlib/libc/sys/linux/cmath/s_clog10f.c newlib/libc/sys/linux/cmath/s_clog10l.c newlib/libc/sys/linux/cmath/s_clogf.c newlib/libc/sys/linux/cmath/s_clogl.c newlib/libc/sys/linux/cmath/s_cpow.c newlib/libc/sys/linux/cmath/s_cpowf.c newlib/libc/sys/linux/cmath/s_cpowl.c newlib/libc/sys/linux/cmath/s_cproj.c newlib/libc/sys/linux/cmath/s_cprojf.c newlib/libc/sys/linux/cmath/s_cprojl.c newlib/libc/sys/linux/cmath/s_csin.c newlib/libc/sys/linux/cmath/s_csinf.c newlib/libc/sys/linux/cmath/s_csinh.c newlib/libc/sys/linux/cmath/s_csinhf.c newlib/libc/sys/linux/cmath/s_csinhl.c newlib/libc/sys/linux/cmath/s_csinl.c newlib/libc/sys/linux/cmath/s_csqrt.c newlib/libc/sys/linux/cmath/s_csqrtf.c newlib/libc/sys/linux/cmath/s_csqrtl.c newlib/libc/sys/linux/cmath/s_ctan.c newlib/libc/sys/linux/cmath/s_ctanf.c newlib/libc/sys/linux/cmath/s_ctanh.c newlib/libc/sys/linux/cmath/s_ctanhf.c newlib/libc/sys/linux/cmath/s_ctanhl.c newlib/libc/sys/linux/cmath/s_ctanl.c newlib/libc/sys/linux/config.h newlib/libc/sys/linux/configure newlib/libc/sys/linux/configure.in newlib/libc/sys/linux/confstr.c newlib/libc/sys/linux/confstr.h newlib/libc/sys/linux/crt1.c newlib/libc/sys/linux/ctermid.c newlib/libc/sys/linux/dl/Makefile.am newlib/libc/sys/linux/dl/Makefile.in newlib/libc/sys/linux/dl/abi-tag.h newlib/libc/sys/linux/dl/atomicity.h newlib/libc/sys/linux/dl/dl-addr.c newlib/libc/sys/linux/dl/dl-cache.c newlib/libc/sys/linux/dl/dl-cache.h newlib/libc/sys/linux/dl/dl-close.c newlib/libc/sys/linux/dl/dl-debug.c newlib/libc/sys/linux/dl/dl-deps.c newlib/libc/sys/linux/dl/dl-dst.h newlib/libc/sys/linux/dl/dl-error.c newlib/libc/sys/linux/dl/dl-fini.c newlib/libc/sys/linux/dl/dl-init.c newlib/libc/sys/linux/dl/dl-iteratephdr.c newlib/libc/sys/linux/dl/dl-libc.c newlib/libc/sys/linux/dl/dl-librecon.h newlib/libc/sys/linux/dl/dl-load.c newlib/libc/sys/linux/dl/dl-lookup.c newlib/libc/sys/linux/dl/dl-lookupcfg.h newlib/libc/sys/linux/dl/dl-minimal.c newlib/libc/sys/linux/dl/dl-misc.c newlib/libc/sys/linux/dl/dl-object.c newlib/libc/sys/linux/dl/dl-open.c newlib/libc/sys/linux/dl/dl-osinfo.h newlib/libc/sys/linux/dl/dl-profile.c newlib/libc/sys/linux/dl/dl-profstub.c newlib/libc/sys/linux/dl/dl-reloc.c newlib/libc/sys/linux/dl/dl-runtime.c newlib/libc/sys/linux/dl/dl-support.c newlib/libc/sys/linux/dl/dl-sym.c newlib/libc/sys/linux/dl/dl-version.c newlib/libc/sys/linux/dl/dlfcn.h newlib/libc/sys/linux/dl/do-lookup.h newlib/libc/sys/linux/dl/do-rel.h newlib/libc/sys/linux/dl/dynamic-link.h newlib/libc/sys/linux/dl/kernel-features.h newlib/libc/sys/linux/dl/ldsodefs.h newlib/libc/sys/linux/dl/libintl.h newlib/libc/sys/linux/dl/trusted-dirs.h newlib/libc/sys/linux/dl/unsecvars.h newlib/libc/sys/linux/fclean.c newlib/libc/sys/linux/flockfile.c newlib/libc/sys/linux/fpathconf.c newlib/libc/sys/linux/free.c newlib/libc/sys/linux/freer.c newlib/libc/sys/linux/fstab.c newlib/libc/sys/linux/fstatvfs.c newlib/libc/sys/linux/fstatvfs64.c newlib/libc/sys/linux/ftok.c newlib/libc/sys/linux/ftw.c newlib/libc/sys/linux/ftw64.c newlib/libc/sys/linux/funlockfile.c newlib/libc/sys/linux/getdate.c newlib/libc/sys/linux/getdate_err.c newlib/libc/sys/linux/gethostid.c newlib/libc/sys/linux/gethostname.c newlib/libc/sys/linux/getlogin.c newlib/libc/sys/linux/getopt.c newlib/libc/sys/linux/getopt1.c newlib/libc/sys/linux/getpwent.c newlib/libc/sys/linux/getreent.c newlib/libc/sys/linux/getrlimit64.c newlib/libc/sys/linux/getwd.c newlib/libc/sys/linux/hp-timing.h newlib/libc/sys/linux/iconv/Makefile.am newlib/libc/sys/linux/iconv/Makefile.in newlib/libc/sys/linux/iconv/categories.def newlib/libc/sys/linux/iconv/dummy-repertoire.c newlib/libc/sys/linux/iconv/gconv.c newlib/libc/sys/linux/iconv/gconv_builtin.c newlib/libc/sys/linux/iconv/gconv_builtin.h newlib/libc/sys/linux/iconv/gconv_cache.c newlib/libc/sys/linux/iconv/gconv_charset.h newlib/libc/sys/linux/iconv/gconv_close.c newlib/libc/sys/linux/iconv/gconv_conf.c newlib/libc/sys/linux/iconv/gconv_db.c newlib/libc/sys/linux/iconv/gconv_dl.c newlib/libc/sys/linux/iconv/gconv_int.h newlib/libc/sys/linux/iconv/gconv_open.c newlib/libc/sys/linux/iconv/gconv_simple.c newlib/libc/sys/linux/iconv/gconv_trans.c newlib/libc/sys/linux/iconv/hash-string.h newlib/libc/sys/linux/iconv/iconv.c newlib/libc/sys/linux/iconv/iconv.h newlib/libc/sys/linux/iconv/iconv_charmap.c newlib/libc/sys/linux/iconv/iconv_close.c newlib/libc/sys/linux/iconv/iconv_open.c newlib/libc/sys/linux/iconv/iconvconfig.c newlib/libc/sys/linux/iconv/iconvconfig.h newlib/libc/sys/linux/iconv/loadinfo.h newlib/libc/sys/linux/iconv/localeinfo.h newlib/libc/sys/linux/iconv/loop.c newlib/libc/sys/linux/iconv/skeleton.c newlib/libc/sys/linux/iconv/strtab.c newlib/libc/sys/linux/ids.c newlib/libc/sys/linux/include/argp.h newlib/libc/sys/linux/include/arpa/ftp.h newlib/libc/sys/linux/include/arpa/inet.h newlib/libc/sys/linux/include/arpa/nameser.h newlib/libc/sys/linux/include/arpa/nameser_compat.h newlib/libc/sys/linux/include/arpa/telnet.h newlib/libc/sys/linux/include/arpa/tftp.h newlib/libc/sys/linux/include/bp-sym.h newlib/libc/sys/linux/include/cmathcalls.h newlib/libc/sys/linux/include/complex.h newlib/libc/sys/linux/include/dl-hash.h newlib/libc/sys/linux/include/dlfcn.h newlib/libc/sys/linux/include/fnmatch.h newlib/libc/sys/linux/include/gconv.h newlib/libc/sys/linux/include/getopt.h newlib/libc/sys/linux/include/glob.h newlib/libc/sys/linux/include/hesiod.h newlib/libc/sys/linux/include/iconv.h newlib/libc/sys/linux/include/ifaddrs.h newlib/libc/sys/linux/include/libc_private.h newlib/libc/sys/linux/include/limits.h newlib/libc/sys/linux/include/link.h newlib/libc/sys/linux/include/malloc.h newlib/libc/sys/linux/include/mcheck.h newlib/libc/sys/linux/include/mqueue.h newlib/libc/sys/linux/include/namespace.h newlib/libc/sys/linux/include/net/bpf.h newlib/libc/sys/linux/include/net/bpf_compat.h newlib/libc/sys/linux/include/net/bpfdesc.h newlib/libc/sys/linux/include/net/bridge.h newlib/libc/sys/linux/include/net/ethernet.h newlib/libc/sys/linux/include/net/fddi.h newlib/libc/sys/linux/include/net/if.h newlib/libc/sys/linux/include/net/if_arc.h newlib/libc/sys/linux/include/net/if_arp.h newlib/libc/sys/linux/include/net/if_atm.h newlib/libc/sys/linux/include/net/if_dl.h newlib/libc/sys/linux/include/net/if_gif.h newlib/libc/sys/linux/include/net/if_ieee80211.h newlib/libc/sys/linux/include/net/if_llc.h newlib/libc/sys/linux/include/net/if_media.h newlib/libc/sys/linux/include/net/if_mib.h newlib/libc/sys/linux/include/net/if_ppp.h newlib/libc/sys/linux/include/net/if_pppvar.h newlib/libc/sys/linux/include/net/if_slvar.h newlib/libc/sys/linux/include/net/if_sppp.h newlib/libc/sys/linux/include/net/if_stf.h newlib/libc/sys/linux/include/net/if_tap.h newlib/libc/sys/linux/include/net/if_tapvar.h newlib/libc/sys/linux/include/net/if_tun.h newlib/libc/sys/linux/include/net/if_tunvar.h newlib/libc/sys/linux/include/net/if_types.h newlib/libc/sys/linux/include/net/if_var.h newlib/libc/sys/linux/include/net/if_vlan_var.h newlib/libc/sys/linux/include/net/intrq.h newlib/libc/sys/linux/include/net/iso88025.h newlib/libc/sys/linux/include/net/net_osdep.h newlib/libc/sys/linux/include/net/netisr.h newlib/libc/sys/linux/include/net/pfil.h newlib/libc/sys/linux/include/net/pfkeyv2.h newlib/libc/sys/linux/include/net/ppp_comp.h newlib/libc/sys/linux/include/net/ppp_defs.h newlib/libc/sys/linux/include/net/radix.h newlib/libc/sys/linux/include/net/raw_cb.h newlib/libc/sys/linux/include/net/route.h newlib/libc/sys/linux/include/net/slcompress.h newlib/libc/sys/linux/include/net/slip.h newlib/libc/sys/linux/include/net/zlib.h newlib/libc/sys/linux/include/netconfig.h newlib/libc/sys/linux/include/netdb.h newlib/libc/sys/linux/include/netinet/icmp6.h newlib/libc/sys/linux/include/netinet/icmp_var.h newlib/libc/sys/linux/include/netinet/if_atm.h newlib/libc/sys/linux/include/netinet/if_ether.h newlib/libc/sys/linux/include/netinet/igmp.h newlib/libc/sys/linux/include/netinet/igmp_var.h newlib/libc/sys/linux/include/netinet/in.h newlib/libc/sys/linux/include/netinet/in_gif.h newlib/libc/sys/linux/include/netinet/in_pcb.h newlib/libc/sys/linux/include/netinet/in_systm.h newlib/libc/sys/linux/include/netinet/in_var.h newlib/libc/sys/linux/include/netinet/ip.h newlib/libc/sys/linux/include/netinet/ip6.h newlib/libc/sys/linux/include/netinet/ip_dummynet.h newlib/libc/sys/linux/include/netinet/ip_ecn.h newlib/libc/sys/linux/include/netinet/ip_encap.h newlib/libc/sys/linux/include/netinet/ip_flow.h newlib/libc/sys/linux/include/netinet/ip_fw.h newlib/libc/sys/linux/include/netinet/ip_icmp.h newlib/libc/sys/linux/include/netinet/ip_mroute.h newlib/libc/sys/linux/include/netinet/ip_var.h newlib/libc/sys/linux/include/netinet/ipprotosw.h newlib/libc/sys/linux/include/netinet/tcp.h newlib/libc/sys/linux/include/netinet/tcp_debug.h newlib/libc/sys/linux/include/netinet/tcp_fsm.h newlib/libc/sys/linux/include/netinet/tcp_seq.h newlib/libc/sys/linux/include/netinet/tcp_timer.h newlib/libc/sys/linux/include/netinet/tcp_var.h newlib/libc/sys/linux/include/netinet/tcpip.h newlib/libc/sys/linux/include/netinet/udp.h newlib/libc/sys/linux/include/netinet/udp_var.h newlib/libc/sys/linux/include/netinet6/ah.h newlib/libc/sys/linux/include/netinet6/ah6.h newlib/libc/sys/linux/include/netinet6/esp.h newlib/libc/sys/linux/include/netinet6/esp6.h newlib/libc/sys/linux/include/netinet6/esp_rijndael.h newlib/libc/sys/linux/include/netinet6/icmp6.h newlib/libc/sys/linux/include/netinet6/in6.h newlib/libc/sys/linux/include/netinet6/in6_gif.h newlib/libc/sys/linux/include/netinet6/in6_ifattach.h newlib/libc/sys/linux/include/netinet6/in6_pcb.h newlib/libc/sys/linux/include/netinet6/in6_prefix.h newlib/libc/sys/linux/include/netinet6/in6_var.h newlib/libc/sys/linux/include/netinet6/ip6.h newlib/libc/sys/linux/include/netinet6/ip6_ecn.h newlib/libc/sys/linux/include/netinet6/ip6_fw.h newlib/libc/sys/linux/include/netinet6/ip6_mroute.h newlib/libc/sys/linux/include/netinet6/ip6_var.h newlib/libc/sys/linux/include/netinet6/ip6protosw.h newlib/libc/sys/linux/include/netinet6/ipcomp.h newlib/libc/sys/linux/include/netinet6/ipcomp6.h newlib/libc/sys/linux/include/netinet6/ipsec.h newlib/libc/sys/linux/include/netinet6/ipsec6.h newlib/libc/sys/linux/include/netinet6/mld6_var.h newlib/libc/sys/linux/include/netinet6/nd6.h newlib/libc/sys/linux/include/netinet6/pim6.h newlib/libc/sys/linux/include/netinet6/pim6_var.h newlib/libc/sys/linux/include/netinet6/raw_ip6.h newlib/libc/sys/linux/include/netinet6/scope6_var.h newlib/libc/sys/linux/include/netinet6/tcp6_var.h newlib/libc/sys/linux/include/netinet6/udp6_var.h newlib/libc/sys/linux/include/netns/idp.h newlib/libc/sys/linux/include/netns/idp_var.h newlib/libc/sys/linux/include/netns/ns.h newlib/libc/sys/linux/include/netns/ns_error.h newlib/libc/sys/linux/include/netns/ns_if.h newlib/libc/sys/linux/include/netns/ns_pcb.h newlib/libc/sys/linux/include/netns/sp.h newlib/libc/sys/linux/include/netns/spidp.h newlib/libc/sys/linux/include/netns/spp_debug.h newlib/libc/sys/linux/include/netns/spp_timer.h newlib/libc/sys/linux/include/netns/spp_var.h newlib/libc/sys/linux/include/nsswitch.h newlib/libc/sys/linux/include/paths.h newlib/libc/sys/linux/include/pthread.h newlib/libc/sys/linux/include/regex.h newlib/libc/sys/linux/include/resolv.h newlib/libc/sys/linux/include/rpc/Makefile newlib/libc/sys/linux/include/rpc/auth.h newlib/libc/sys/linux/include/rpc/auth_des.h newlib/libc/sys/linux/include/rpc/auth_kerb.h newlib/libc/sys/linux/include/rpc/auth_unix.h newlib/libc/sys/linux/include/rpc/clnt.h newlib/libc/sys/linux/include/rpc/clnt_soc.h newlib/libc/sys/linux/include/rpc/clnt_stat.h newlib/libc/sys/linux/include/rpc/des.h newlib/libc/sys/linux/include/rpc/des_crypt.h newlib/libc/sys/linux/include/rpc/nettype.h newlib/libc/sys/linux/include/rpc/pmap_clnt.h newlib/libc/sys/linux/include/rpc/pmap_prot.h newlib/libc/sys/linux/include/rpc/pmap_rmt.h newlib/libc/sys/linux/include/rpc/raw.h newlib/libc/sys/linux/include/rpc/rpc.h newlib/libc/sys/linux/include/rpc/rpc_com.h newlib/libc/sys/linux/include/rpc/rpc_msg.h newlib/libc/sys/linux/include/rpc/rpcb_clnt.h newlib/libc/sys/linux/include/rpc/rpcb_prot.h newlib/libc/sys/linux/include/rpc/rpcb_prot.x newlib/libc/sys/linux/include/rpc/rpcent.h newlib/libc/sys/linux/include/rpc/svc.h newlib/libc/sys/linux/include/rpc/svc_auth.h newlib/libc/sys/linux/include/rpc/svc_dg.h newlib/libc/sys/linux/include/rpc/svc_soc.h newlib/libc/sys/linux/include/rpc/types.h newlib/libc/sys/linux/include/rpc/xdr.h newlib/libc/sys/linux/include/rune.h newlib/libc/sys/linux/include/runetype.h newlib/libc/sys/linux/include/semaphore.h newlib/libc/sys/linux/include/setjmp.h newlib/libc/sys/linux/include/setlocale.h newlib/libc/sys/linux/include/stdint.h newlib/libc/sys/linux/include/time.h newlib/libc/sys/linux/include/un-namespace.h newlib/libc/sys/linux/include/unistd.h newlib/libc/sys/linux/include/wordexp.h newlib/libc/sys/linux/inode.c newlib/libc/sys/linux/internal_statvfs.c newlib/libc/sys/linux/intl/Makefile.am newlib/libc/sys/linux/intl/Makefile.in newlib/libc/sys/linux/intl/bindtextdom.c newlib/libc/sys/linux/intl/catgets.c newlib/libc/sys/linux/intl/catgetsinfo.h newlib/libc/sys/linux/intl/config.h newlib/libc/sys/linux/intl/dcgettext.c newlib/libc/sys/linux/intl/dcigettext.c newlib/libc/sys/linux/intl/dcngettext.c newlib/libc/sys/linux/intl/dgettext.c newlib/libc/sys/linux/intl/dngettext.c newlib/libc/sys/linux/intl/explodename.c newlib/libc/sys/linux/intl/finddomain.c newlib/libc/sys/linux/intl/gettext.c newlib/libc/sys/linux/intl/gettext.h newlib/libc/sys/linux/intl/gettextP.h newlib/libc/sys/linux/intl/hash-string.h newlib/libc/sys/linux/intl/l10nflist.c newlib/libc/sys/linux/intl/loadinfo.h newlib/libc/sys/linux/intl/loadmsgcat.c newlib/libc/sys/linux/intl/locale.alias newlib/libc/sys/linux/intl/localealias.c newlib/libc/sys/linux/intl/ngettext.c newlib/libc/sys/linux/intl/open_catalog.c newlib/libc/sys/linux/intl/plural.c newlib/libc/sys/linux/intl/plural.y newlib/libc/sys/linux/intl/stpcpy.c newlib/libc/sys/linux/intl/textdomain.c newlib/libc/sys/linux/io.c newlib/libc/sys/linux/io64.c newlib/libc/sys/linux/ipc.c newlib/libc/sys/linux/kernel_sigaction.h newlib/libc/sys/linux/libc-internal.h newlib/libc/sys/linux/libc-symbols.h newlib/libc/sys/linux/libc-tsd.h newlib/libc/sys/linux/libintl.h newlib/libc/sys/linux/linux.c newlib/libc/sys/linux/linux_fsinfo.h newlib/libc/sys/linux/linuxthreads/LICENSE newlib/libc/sys/linux/linuxthreads/Makefile.am newlib/libc/sys/linux/linuxthreads/Makefile.in newlib/libc/sys/linux/linuxthreads/aclocal.m4 newlib/libc/sys/linux/linuxthreads/attr.c newlib/libc/sys/linux/linuxthreads/barrier.c newlib/libc/sys/linux/linuxthreads/bits/initspin.h newlib/libc/sys/linux/linuxthreads/bits/libc-lock.h newlib/libc/sys/linux/linuxthreads/bits/libc-tsd.h newlib/libc/sys/linux/linuxthreads/bits/local_lim.h newlib/libc/sys/linux/linuxthreads/bits/posix_opt.h newlib/libc/sys/linux/linuxthreads/bits/pthreadtypes.h newlib/libc/sys/linux/linuxthreads/bits/sigthread.h newlib/libc/sys/linux/linuxthreads/bp-sym.h newlib/libc/sys/linux/linuxthreads/cancel.c newlib/libc/sys/linux/linuxthreads/condvar.c newlib/libc/sys/linux/linuxthreads/config.h newlib/libc/sys/linux/linuxthreads/configure newlib/libc/sys/linux/linuxthreads/configure.in newlib/libc/sys/linux/linuxthreads/defs.awk newlib/libc/sys/linux/linuxthreads/ecmutex.c newlib/libc/sys/linux/linuxthreads/events.c newlib/libc/sys/linux/linuxthreads/getcpuclockid.c newlib/libc/sys/linux/linuxthreads/getreent.c newlib/libc/sys/linux/linuxthreads/internals.h newlib/libc/sys/linux/linuxthreads/join.c newlib/libc/sys/linux/linuxthreads/joinrace.c newlib/libc/sys/linux/linuxthreads/kernel-features.h newlib/libc/sys/linux/linuxthreads/libc-internal.h newlib/libc/sys/linux/linuxthreads/libc-symbols.h newlib/libc/sys/linux/linuxthreads/linuxthreads.texi newlib/libc/sys/linux/linuxthreads/lockfile.c newlib/libc/sys/linux/linuxthreads/machine/Makefile.am newlib/libc/sys/linux/linuxthreads/machine/Makefile.in newlib/libc/sys/linux/linuxthreads/machine/aclocal.m4 newlib/libc/sys/linux/linuxthreads/machine/configure newlib/libc/sys/linux/linuxthreads/machine/configure.in newlib/libc/sys/linux/linuxthreads/machine/generic/generic-sysdep.h newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.am newlib/libc/sys/linux/linuxthreads/machine/i386/Makefile.in newlib/libc/sys/linux/linuxthreads/machine/i386/aclocal.m4 newlib/libc/sys/linux/linuxthreads/machine/i386/bp-asm.h newlib/libc/sys/linux/linuxthreads/machine/i386/clone.S newlib/libc/sys/linux/linuxthreads/machine/i386/configure newlib/libc/sys/linux/linuxthreads/machine/i386/configure.in newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.S newlib/libc/sys/linux/linuxthreads/machine/i386/i386-sysdep.h newlib/libc/sys/linux/linuxthreads/machine/i386/pspinlock.c newlib/libc/sys/linux/linuxthreads/machine/i386/pt-machine.h newlib/libc/sys/linux/linuxthreads/machine/i386/sigcontextinfo.h newlib/libc/sys/linux/linuxthreads/machine/i386/stackinfo.h newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.S newlib/libc/sys/linux/linuxthreads/machine/i386/sysdep.h newlib/libc/sys/linux/linuxthreads/machine/i386/useldt.h newlib/libc/sys/linux/linuxthreads/manager.c newlib/libc/sys/linux/linuxthreads/mq_notify.c newlib/libc/sys/linux/linuxthreads/mutex.c newlib/libc/sys/linux/linuxthreads/no-tsd.c newlib/libc/sys/linux/linuxthreads/oldsemaphore.c newlib/libc/sys/linux/linuxthreads/posix-timer.h newlib/libc/sys/linux/linuxthreads/prio.c newlib/libc/sys/linux/linuxthreads/proc_service.h newlib/libc/sys/linux/linuxthreads/pt-machine.c newlib/libc/sys/linux/linuxthreads/ptclock_gettime.c newlib/libc/sys/linux/linuxthreads/ptclock_settime.c newlib/libc/sys/linux/linuxthreads/ptfork.c newlib/libc/sys/linux/linuxthreads/pthread.c newlib/libc/sys/linux/linuxthreads/ptlongjmp.c newlib/libc/sys/linux/linuxthreads/queue.h newlib/libc/sys/linux/linuxthreads/reent.c newlib/libc/sys/linux/linuxthreads/reqsyscalls.c newlib/libc/sys/linux/linuxthreads/restart.h newlib/libc/sys/linux/linuxthreads/rwlock.c newlib/libc/sys/linux/linuxthreads/semaphore.c newlib/libc/sys/linux/linuxthreads/semaphore.h newlib/libc/sys/linux/linuxthreads/shlib-compat.h newlib/libc/sys/linux/linuxthreads/signals.c newlib/libc/sys/linux/linuxthreads/specific.c newlib/libc/sys/linux/linuxthreads/spinlock.c newlib/libc/sys/linux/linuxthreads/spinlock.h newlib/libc/sys/linux/linuxthreads/sysctl.c newlib/libc/sys/linux/linuxthreads/td_init.c newlib/libc/sys/linux/linuxthreads/td_log.c newlib/libc/sys/linux/linuxthreads/td_symbol_list.c newlib/libc/sys/linux/linuxthreads/td_ta_clear_event.c newlib/libc/sys/linux/linuxthreads/td_ta_delete.c newlib/libc/sys/linux/linuxthreads/td_ta_enable_stats.c newlib/libc/sys/linux/linuxthreads/td_ta_event_addr.c newlib/libc/sys/linux/linuxthreads/td_ta_event_getmsg.c newlib/libc/sys/linux/linuxthreads/td_ta_get_nthreads.c newlib/libc/sys/linux/linuxthreads/td_ta_get_ph.c newlib/libc/sys/linux/linuxthreads/td_ta_get_stats.c newlib/libc/sys/linux/linuxthreads/td_ta_map_id2thr.c newlib/libc/sys/linux/linuxthreads/td_ta_map_lwp2thr.c newlib/libc/sys/linux/linuxthreads/td_ta_new.c newlib/libc/sys/linux/linuxthreads/td_ta_reset_stats.c newlib/libc/sys/linux/linuxthreads/td_ta_set_event.c newlib/libc/sys/linux/linuxthreads/td_ta_setconcurrency.c newlib/libc/sys/linux/linuxthreads/td_ta_thr_iter.c newlib/libc/sys/linux/linuxthreads/td_ta_tsd_iter.c newlib/libc/sys/linux/linuxthreads/td_thr_clear_event.c newlib/libc/sys/linux/linuxthreads/td_thr_dbresume.c newlib/libc/sys/linux/linuxthreads/td_thr_dbsuspend.c newlib/libc/sys/linux/linuxthreads/td_thr_event_enable.c newlib/libc/sys/linux/linuxthreads/td_thr_event_getmsg.c newlib/libc/sys/linux/linuxthreads/td_thr_get_info.c newlib/libc/sys/linux/linuxthreads/td_thr_getfpregs.c newlib/libc/sys/linux/linuxthreads/td_thr_getgregs.c newlib/libc/sys/linux/linuxthreads/td_thr_getxregs.c newlib/libc/sys/linux/linuxthreads/td_thr_getxregsize.c newlib/libc/sys/linux/linuxthreads/td_thr_set_event.c newlib/libc/sys/linux/linuxthreads/td_thr_setfpregs.c newlib/libc/sys/linux/linuxthreads/td_thr_setgregs.c newlib/libc/sys/linux/linuxthreads/td_thr_setprio.c newlib/libc/sys/linux/linuxthreads/td_thr_setsigpending.c newlib/libc/sys/linux/linuxthreads/td_thr_setxregs.c newlib/libc/sys/linux/linuxthreads/td_thr_sigsetmask.c newlib/libc/sys/linux/linuxthreads/td_thr_tsd.c newlib/libc/sys/linux/linuxthreads/td_thr_validate.c newlib/libc/sys/linux/linuxthreads/testrtsig.h newlib/libc/sys/linux/linuxthreads/thread_db.h newlib/libc/sys/linux/linuxthreads/thread_dbP.h newlib/libc/sys/linux/linuxthreads/timer_create.c newlib/libc/sys/linux/linuxthreads/timer_delete.c newlib/libc/sys/linux/linuxthreads/timer_getoverr.c newlib/libc/sys/linux/linuxthreads/timer_gettime.c newlib/libc/sys/linux/linuxthreads/timer_routines.c newlib/libc/sys/linux/linuxthreads/timer_settime.c newlib/libc/sys/linux/linuxthreads/tst-cancel.c newlib/libc/sys/linux/linuxthreads/tst-context.c newlib/libc/sys/linux/linuxthreads/tststack.c newlib/libc/sys/linux/linuxthreads/unload.c newlib/libc/sys/linux/linuxthreads/weaks.c newlib/libc/sys/linux/linuxthreads/wrapsyscall.c newlib/libc/sys/linux/machine/Makefile.am newlib/libc/sys/linux/machine/Makefile.in newlib/libc/sys/linux/machine/aclocal.m4 newlib/libc/sys/linux/machine/configure newlib/libc/sys/linux/machine/configure.in newlib/libc/sys/linux/machine/hp-timing.h newlib/libc/sys/linux/machine/i386/Makefile.am newlib/libc/sys/linux/machine/i386/Makefile.in newlib/libc/sys/linux/machine/i386/aclocal.m4 newlib/libc/sys/linux/machine/i386/configure newlib/libc/sys/linux/machine/i386/configure.in newlib/libc/sys/linux/machine/i386/crt0.c newlib/libc/sys/linux/machine/i386/dl-machine.h newlib/libc/sys/linux/machine/i386/dl-procinfo.c newlib/libc/sys/linux/machine/i386/dl-procinfo.h newlib/libc/sys/linux/machine/i386/get_clockfreq.c newlib/libc/sys/linux/machine/i386/getpagesize.c newlib/libc/sys/linux/machine/i386/hp-timing.c newlib/libc/sys/linux/machine/i386/hp-timing.h newlib/libc/sys/linux/machine/i386/huge_val.h newlib/libc/sys/linux/machine/i386/i386mach.h newlib/libc/sys/linux/machine/i386/include/endian.h newlib/libc/sys/linux/machine/i386/include/param.h newlib/libc/sys/linux/machine/i386/include/setjmp.h newlib/libc/sys/linux/machine/i386/include/termios.h newlib/libc/sys/linux/machine/i386/setjmp.S newlib/libc/sys/linux/machine/i386/sigaction.c newlib/libc/sys/linux/machine/i386/sigstack.h newlib/libc/sys/linux/machine/i386/socketcall.h newlib/libc/sys/linux/machine/i386/syscall.h newlib/libc/sys/linux/machine/i386/sysdep.h newlib/libc/sys/linux/machine/i386/weakalias.h newlib/libc/sys/linux/malign.c newlib/libc/sys/linux/malignr.c newlib/libc/sys/linux/mallinfor.c newlib/libc/sys/linux/malloc.c newlib/libc/sys/linux/mallocr.c newlib/libc/sys/linux/malloptr.c newlib/libc/sys/linux/mallstatsr.c newlib/libc/sys/linux/mcheck.c newlib/libc/sys/linux/mhooks.h newlib/libc/sys/linux/mmap.c newlib/libc/sys/linux/mntent.c newlib/libc/sys/linux/mntent_r.c newlib/libc/sys/linux/mq_close.c newlib/libc/sys/linux/mq_getattr.c newlib/libc/sys/linux/mq_notify.c newlib/libc/sys/linux/mq_open.c newlib/libc/sys/linux/mq_receive.c newlib/libc/sys/linux/mq_send.c newlib/libc/sys/linux/mq_setattr.c newlib/libc/sys/linux/mq_unlink.c newlib/libc/sys/linux/mqlocal.h newlib/libc/sys/linux/msize.c newlib/libc/sys/linux/msizer.c newlib/libc/sys/linux/mstats.c newlib/libc/sys/linux/mtrim.c newlib/libc/sys/linux/mtrimr.c newlib/libc/sys/linux/net/Makefile.am newlib/libc/sys/linux/net/Makefile.in newlib/libc/sys/linux/net/addr2ascii.3 newlib/libc/sys/linux/net/addr2ascii.c newlib/libc/sys/linux/net/ascii2addr.c newlib/libc/sys/linux/net/base64.c newlib/libc/sys/linux/net/bindresvport.c newlib/libc/sys/linux/net/byteorder.3 newlib/libc/sys/linux/net/ether_addr.c newlib/libc/sys/linux/net/ethers.3 newlib/libc/sys/linux/net/getaddrinfo.3 newlib/libc/sys/linux/net/getaddrinfo.c newlib/libc/sys/linux/net/gethostbydns.c newlib/libc/sys/linux/net/gethostbyht.c newlib/libc/sys/linux/net/gethostbyname.3 newlib/libc/sys/linux/net/gethostbynis.c newlib/libc/sys/linux/net/gethostnamadr.c newlib/libc/sys/linux/net/getifaddrs.3 newlib/libc/sys/linux/net/getifaddrs.c newlib/libc/sys/linux/net/getipnodebyname.3 newlib/libc/sys/linux/net/getnameinfo.3 newlib/libc/sys/linux/net/getnameinfo.c newlib/libc/sys/linux/net/getnetbydns.c newlib/libc/sys/linux/net/getnetbyht.c newlib/libc/sys/linux/net/getnetbynis.c newlib/libc/sys/linux/net/getnetent.3 newlib/libc/sys/linux/net/getnetnamadr.c newlib/libc/sys/linux/net/getproto.c newlib/libc/sys/linux/net/getprotoent.3 newlib/libc/sys/linux/net/getprotoent.c newlib/libc/sys/linux/net/getprotoname.c newlib/libc/sys/linux/net/getservbyname.c newlib/libc/sys/linux/net/getservbyport.c newlib/libc/sys/linux/net/getservent.3 newlib/libc/sys/linux/net/getservent.c newlib/libc/sys/linux/net/herror.c newlib/libc/sys/linux/net/hesiod.3 newlib/libc/sys/linux/net/hesiod.c newlib/libc/sys/linux/net/if_indextoname.3 newlib/libc/sys/linux/net/ifname.c newlib/libc/sys/linux/net/inet.3 newlib/libc/sys/linux/net/inet6_option_space.3 newlib/libc/sys/linux/net/inet6_rthdr_space.3 newlib/libc/sys/linux/net/inet_addr.c newlib/libc/sys/linux/net/inet_lnaof.c newlib/libc/sys/linux/net/inet_makeaddr.c newlib/libc/sys/linux/net/inet_net.3 newlib/libc/sys/linux/net/inet_net_ntop.c newlib/libc/sys/linux/net/inet_net_pton.c newlib/libc/sys/linux/net/inet_neta.c newlib/libc/sys/linux/net/inet_netof.c newlib/libc/sys/linux/net/inet_network.c newlib/libc/sys/linux/net/inet_ntoa.c newlib/libc/sys/linux/net/inet_ntop.c newlib/libc/sys/linux/net/inet_pton.c newlib/libc/sys/linux/net/innetgr-stub.c newlib/libc/sys/linux/net/ip6opt.c newlib/libc/sys/linux/net/iso_addr.3 newlib/libc/sys/linux/net/iso_addr.c newlib/libc/sys/linux/net/issetugid-stub.c newlib/libc/sys/linux/net/linkaddr.3 newlib/libc/sys/linux/net/linkaddr.c newlib/libc/sys/linux/net/map_v4v6.c newlib/libc/sys/linux/net/name6.c newlib/libc/sys/linux/net/namespace.h newlib/libc/sys/linux/net/ns.3 newlib/libc/sys/linux/net/ns_addr.c newlib/libc/sys/linux/net/ns_name.c newlib/libc/sys/linux/net/ns_netint.c newlib/libc/sys/linux/net/ns_ntoa.c newlib/libc/sys/linux/net/ns_parse.c newlib/libc/sys/linux/net/ns_print.c newlib/libc/sys/linux/net/ns_ttl.c newlib/libc/sys/linux/net/nsap_addr.c newlib/libc/sys/linux/net/nsdispatch.3 newlib/libc/sys/linux/net/nsdispatch.c newlib/libc/sys/linux/net/nslexer.c newlib/libc/sys/linux/net/nslexer.l newlib/libc/sys/linux/net/nsparser.c newlib/libc/sys/linux/net/nsparser.h newlib/libc/sys/linux/net/nsparser.y newlib/libc/sys/linux/net/rcmd.3 newlib/libc/sys/linux/net/rcmd.c newlib/libc/sys/linux/net/rcmdsh.3 newlib/libc/sys/linux/net/rcmdsh.c newlib/libc/sys/linux/net/recv.c newlib/libc/sys/linux/net/res_comp.c newlib/libc/sys/linux/net/res_config.h newlib/libc/sys/linux/net/res_data.c newlib/libc/sys/linux/net/res_debug.c newlib/libc/sys/linux/net/res_init.c newlib/libc/sys/linux/net/res_mkquery.c newlib/libc/sys/linux/net/res_mkupdate.c newlib/libc/sys/linux/net/res_query.c newlib/libc/sys/linux/net/res_send.c newlib/libc/sys/linux/net/res_update.c newlib/libc/sys/linux/net/resolver.3 newlib/libc/sys/linux/net/rthdr.c newlib/libc/sys/linux/net/send.c newlib/libc/sys/linux/net/un-namespace.h newlib/libc/sys/linux/net/vars.c newlib/libc/sys/linux/ntp_gettime.c newlib/libc/sys/linux/pathconf.c newlib/libc/sys/linux/pread.c newlib/libc/sys/linux/pread64.c newlib/libc/sys/linux/process.c newlib/libc/sys/linux/prof-freq.c newlib/libc/sys/linux/profile.c newlib/libc/sys/linux/psignal.c newlib/libc/sys/linux/pvallocr.c newlib/libc/sys/linux/pwrite.c newlib/libc/sys/linux/pwrite64.c newlib/libc/sys/linux/raise.c newlib/libc/sys/linux/readdir64.c newlib/libc/sys/linux/realloc.c newlib/libc/sys/linux/reallocr.c newlib/libc/sys/linux/realpath.c newlib/libc/sys/linux/rename.c newlib/libc/sys/linux/resource.c newlib/libc/sys/linux/scandir64.c newlib/libc/sys/linux/sched.c newlib/libc/sys/linux/select.c newlib/libc/sys/linux/seteuid.c newlib/libc/sys/linux/sethostid.c newlib/libc/sys/linux/sethostname.c newlib/libc/sys/linux/setrlimit64.c newlib/libc/sys/linux/shared.ld newlib/libc/sys/linux/shm_open.c newlib/libc/sys/linux/shm_unlink.c newlib/libc/sys/linux/sig.c newlib/libc/sys/linux/sigaction.c newlib/libc/sys/linux/siglongjmp.c newlib/libc/sys/linux/signal.c newlib/libc/sys/linux/sigqueue.c newlib/libc/sys/linux/sigset.c newlib/libc/sys/linux/sigwait.c newlib/libc/sys/linux/sleep.c newlib/libc/sys/linux/socket.c newlib/libc/sys/linux/sockops.h newlib/libc/sys/linux/stack.c newlib/libc/sys/linux/statvfs.c newlib/libc/sys/linux/statvfs64.c newlib/libc/sys/linux/stdlib/COPYRIGHT newlib/libc/sys/linux/stdlib/Makefile.am newlib/libc/sys/linux/stdlib/Makefile.in newlib/libc/sys/linux/stdlib/cclass.h newlib/libc/sys/linux/stdlib/cname.h newlib/libc/sys/linux/stdlib/collate.c newlib/libc/sys/linux/stdlib/collate.h newlib/libc/sys/linux/stdlib/collcmp.c newlib/libc/sys/linux/stdlib/engine.c newlib/libc/sys/linux/stdlib/fnmatch.3 newlib/libc/sys/linux/stdlib/fnmatch.c newlib/libc/sys/linux/stdlib/glob.3 newlib/libc/sys/linux/stdlib/glob.c newlib/libc/sys/linux/stdlib/reallocf.c newlib/libc/sys/linux/stdlib/regcomp.c newlib/libc/sys/linux/stdlib/regerror.c newlib/libc/sys/linux/stdlib/regex.3 newlib/libc/sys/linux/stdlib/regex2.h newlib/libc/sys/linux/stdlib/regexec.c newlib/libc/sys/linux/stdlib/regfree.c newlib/libc/sys/linux/stdlib/utils.h newlib/libc/sys/linux/stdlib/wordexp.c newlib/libc/sys/linux/stdlib/wordfree.c newlib/libc/sys/linux/strsignal.c newlib/libc/sys/linux/strverscmp.c newlib/libc/sys/linux/sys/_types.h newlib/libc/sys/linux/sys/cdefs.h newlib/libc/sys/linux/sys/dirent.h newlib/libc/sys/linux/sys/dlfcn.h newlib/libc/sys/linux/sys/elfclass.h newlib/libc/sys/linux/sys/errno.h newlib/libc/sys/linux/sys/event.h newlib/libc/sys/linux/sys/fcntl.h newlib/libc/sys/linux/sys/features.h newlib/libc/sys/linux/sys/file.h newlib/libc/sys/linux/sys/ioccom.h newlib/libc/sys/linux/sys/ioctl.h newlib/libc/sys/linux/sys/libc-tsd.h newlib/libc/sys/linux/sys/link.h newlib/libc/sys/linux/sys/linux_time.h newlib/libc/sys/linux/sys/lock.h newlib/libc/sys/linux/sys/param.h newlib/libc/sys/linux/sys/resource.h newlib/libc/sys/linux/sys/select.h newlib/libc/sys/linux/sys/signal.h newlib/libc/sys/linux/sys/socket.h newlib/libc/sys/linux/sys/sockio.h newlib/libc/sys/linux/sys/stat.h newlib/libc/sys/linux/sys/stdio.h newlib/libc/sys/linux/sys/string.h newlib/libc/sys/linux/sys/termios.h newlib/libc/sys/linux/sys/time.h newlib/libc/sys/linux/sys/types.h newlib/libc/sys/linux/sys/unistd.h newlib/libc/sys/linux/sys/utime.h newlib/libc/sys/linux/sys/utmp.h newlib/libc/sys/linux/sys/utsname.h newlib/libc/sys/linux/sys/wait.h newlib/libc/sys/linux/sysconf.c newlib/libc/sys/linux/sysctl.c newlib/libc/sys/linux/systat.c newlib/libc/sys/linux/system.c newlib/libc/sys/linux/tcdrain.c newlib/libc/sys/linux/tcsendbrk.c newlib/libc/sys/linux/termios.c newlib/libc/sys/linux/thread-m.h newlib/libc/sys/linux/time.c newlib/libc/sys/linux/ttyname_r.c newlib/libc/sys/linux/usleep.c newlib/libc/sys/linux/utimes.c newlib/libc/sys/linux/vallocr.c newlib/libc/sys/linux/versionsort.c newlib/libc/sys/linux/versionsort64.c newlib/libc/sys/linux/wait.c newlib/libc/sys/m88kbug/Makefile.am newlib/libc/sys/m88kbug/Makefile.in newlib/libc/sys/m88kbug/aclocal.m4 newlib/libc/sys/m88kbug/configure newlib/libc/sys/m88kbug/configure.in newlib/libc/sys/m88kbug/crt0.c newlib/libc/sys/m88kbug/sys/systraps.h newlib/libc/sys/m88kbug/syscalls.c newlib/libc/sys/mmixware/Makefile.am newlib/libc/sys/mmixware/Makefile.in newlib/libc/sys/mmixware/_exit.c newlib/libc/sys/mmixware/access.c newlib/libc/sys/mmixware/aclocal.m4 newlib/libc/sys/mmixware/chmod.c newlib/libc/sys/mmixware/chown.c newlib/libc/sys/mmixware/close.c newlib/libc/sys/mmixware/configure newlib/libc/sys/mmixware/configure.in newlib/libc/sys/mmixware/creat.c newlib/libc/sys/mmixware/crt0.c newlib/libc/sys/mmixware/execv.c newlib/libc/sys/mmixware/execve.c newlib/libc/sys/mmixware/fork.c newlib/libc/sys/mmixware/fstat.c newlib/libc/sys/mmixware/getpid.c newlib/libc/sys/mmixware/gettime.c newlib/libc/sys/mmixware/isatty.c newlib/libc/sys/mmixware/kill.c newlib/libc/sys/mmixware/link.c newlib/libc/sys/mmixware/lseek.c newlib/libc/sys/mmixware/open.c newlib/libc/sys/mmixware/pipe.c newlib/libc/sys/mmixware/read.c newlib/libc/sys/mmixware/sbrk.c newlib/libc/sys/mmixware/setjmp.S newlib/libc/sys/mmixware/stat.c newlib/libc/sys/mmixware/sys/syscall.h newlib/libc/sys/mmixware/time.c newlib/libc/sys/mmixware/times.c newlib/libc/sys/mmixware/unlink.c newlib/libc/sys/mmixware/utime.c newlib/libc/sys/mmixware/wait.c newlib/libc/sys/mmixware/write.c newlib/libc/sys/netware/Makefile.am newlib/libc/sys/netware/Makefile.in newlib/libc/sys/netware/aclocal.m4 newlib/libc/sys/netware/configure newlib/libc/sys/netware/configure.in newlib/libc/sys/netware/crt0.c newlib/libc/sys/netware/getpid.c newlib/libc/sys/netware/link.c newlib/libc/sys/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/inttypes.h newlib/libc/sys/rtems/include/limits.h newlib/libc/sys/rtems/include/stdint.h newlib/libc/sys/rtems/machine/limits.h newlib/libc/sys/rtems/machine/param.h newlib/libc/sys/rtems/sys/dirent.h newlib/libc/sys/rtems/sys/param.h newlib/libc/sys/rtems/sys/queue.h newlib/libc/sys/rtems/sys/syslimits.h newlib/libc/sys/rtems/sys/utime.h newlib/libc/sys/sh/Makefile.am newlib/libc/sys/sh/Makefile.in newlib/libc/sys/sh/aclocal.m4 newlib/libc/sys/sh/configure newlib/libc/sys/sh/configure.in newlib/libc/sys/sh/creat.c newlib/libc/sys/sh/crt0.S newlib/libc/sys/sh/ftruncate.c newlib/libc/sys/sh/sys/syscall.h newlib/libc/sys/sh/syscalls.c newlib/libc/sys/sh/trap.S newlib/libc/sys/sh/truncate.c newlib/libc/sys/sparc64/Makefile.am newlib/libc/sys/sparc64/Makefile.in newlib/libc/sys/sparc64/_exit.S newlib/libc/sys/sparc64/_main.c newlib/libc/sys/sparc64/aclocal.m4 newlib/libc/sys/sparc64/cerror.S newlib/libc/sys/sparc64/closedir.c newlib/libc/sys/sparc64/configure newlib/libc/sys/sparc64/configure.in newlib/libc/sys/sparc64/creat.c newlib/libc/sys/sparc64/crt0.S newlib/libc/sys/sparc64/dup2.S newlib/libc/sys/sparc64/execve.S newlib/libc/sys/sparc64/ieee.c newlib/libc/sys/sparc64/isatty.c newlib/libc/sys/sparc64/lstat.S newlib/libc/sys/sparc64/opendir.c newlib/libc/sys/sparc64/readdir.c newlib/libc/sys/sparc64/rewinddir.c newlib/libc/sys/sparc64/sbrk.S newlib/libc/sys/sparc64/scandir.c newlib/libc/sys/sparc64/seekdir.c newlib/libc/sys/sparc64/sigsetjmp.S newlib/libc/sys/sparc64/stat.S newlib/libc/sys/sparc64/sys/dirent.h newlib/libc/sys/sparc64/sys/fcntl.h newlib/libc/sys/sparc64/sys/file.h newlib/libc/sys/sparc64/sys/stat.h newlib/libc/sys/sparc64/sys/syscall.h newlib/libc/sys/sparc64/sys/syscallasm.h newlib/libc/sys/sparc64/sys/termios.h newlib/libc/sys/sparc64/sys/time.h newlib/libc/sys/sparc64/sys/utime.h newlib/libc/sys/sparc64/sys/utmp.h newlib/libc/sys/sparc64/sys/wait.h newlib/libc/sys/sparc64/telldir.c newlib/libc/sys/sparc64/template.S newlib/libc/sys/sparc64/template_r.S newlib/libc/sys/sparc64/utime.S newlib/libc/sys/sparc64/utime2.c newlib/libc/sys/sparc64/wait.S newlib/libc/sys/sun4/Makefile.am newlib/libc/sys/sun4/Makefile.in newlib/libc/sys/sun4/_main.c newlib/libc/sys/sun4/aclocal.m4 newlib/libc/sys/sun4/configure newlib/libc/sys/sun4/configure.in newlib/libc/sys/sun4/ieee.c newlib/libc/sys/sun4/sys/dirent.h newlib/libc/sys/sun4/sys/file.h newlib/libc/sys/sun4/sys/termios.h newlib/libc/sys/sun4/sys/utime.h newlib/libc/sys/sun4/sys/utmp.h newlib/libc/sys/sun4/sys/wait.h newlib/libc/sys/sysmec/Makefile.am newlib/libc/sys/sysmec/Makefile.in newlib/libc/sys/sysmec/_exit.c newlib/libc/sys/sysmec/access.c newlib/libc/sys/sysmec/aclocal.m4 newlib/libc/sys/sysmec/chmod.c newlib/libc/sys/sysmec/chown.c newlib/libc/sys/sysmec/close.c newlib/libc/sys/sysmec/configure newlib/libc/sys/sysmec/configure.in newlib/libc/sys/sysmec/creat.c newlib/libc/sys/sysmec/crt0.S newlib/libc/sys/sysmec/crt1.c newlib/libc/sys/sysmec/execv.c newlib/libc/sys/sysmec/execve.c newlib/libc/sys/sysmec/fork.c newlib/libc/sys/sysmec/fstat.c newlib/libc/sys/sysmec/getpid.c newlib/libc/sys/sysmec/gettime.c newlib/libc/sys/sysmec/isatty.c newlib/libc/sys/sysmec/kill.c newlib/libc/sys/sysmec/lseek.c newlib/libc/sys/sysmec/open.c newlib/libc/sys/sysmec/pipe.c newlib/libc/sys/sysmec/read.c newlib/libc/sys/sysmec/sbrk.c newlib/libc/sys/sysmec/stat.c newlib/libc/sys/sysmec/sys/syscall.h newlib/libc/sys/sysmec/time.c newlib/libc/sys/sysmec/times.c newlib/libc/sys/sysmec/trap.S newlib/libc/sys/sysmec/unlink.c newlib/libc/sys/sysmec/utime.c newlib/libc/sys/sysmec/wait.c newlib/libc/sys/sysmec/write.c newlib/libc/sys/sysnec810/Makefile.am newlib/libc/sys/sysnec810/Makefile.in newlib/libc/sys/sysnec810/aclocal.m4 newlib/libc/sys/sysnec810/configure newlib/libc/sys/sysnec810/configure.in newlib/libc/sys/sysnec810/crt0.s newlib/libc/sys/sysnec810/io.s newlib/libc/sys/sysnec810/misc.c newlib/libc/sys/sysnec810/sbrk.c newlib/libc/sys/sysnec810/write.c newlib/libc/sys/sysnecv850/Makefile.am newlib/libc/sys/sysnecv850/Makefile.in newlib/libc/sys/sysnecv850/_exit.c newlib/libc/sys/sysnecv850/access.c newlib/libc/sys/sysnecv850/aclocal.m4 newlib/libc/sys/sysnecv850/chmod.c newlib/libc/sys/sysnecv850/chown.c newlib/libc/sys/sysnecv850/close.c newlib/libc/sys/sysnecv850/configure newlib/libc/sys/sysnecv850/configure.in newlib/libc/sys/sysnecv850/creat.c newlib/libc/sys/sysnecv850/crt0.S newlib/libc/sys/sysnecv850/crt1.c newlib/libc/sys/sysnecv850/execv.c newlib/libc/sys/sysnecv850/execve.c newlib/libc/sys/sysnecv850/fork.c newlib/libc/sys/sysnecv850/fstat.c newlib/libc/sys/sysnecv850/getpid.c newlib/libc/sys/sysnecv850/gettime.c newlib/libc/sys/sysnecv850/isatty.c newlib/libc/sys/sysnecv850/kill.c newlib/libc/sys/sysnecv850/link.c newlib/libc/sys/sysnecv850/lseek.c newlib/libc/sys/sysnecv850/open.c newlib/libc/sys/sysnecv850/pipe.c newlib/libc/sys/sysnecv850/read.c newlib/libc/sys/sysnecv850/sbrk.c newlib/libc/sys/sysnecv850/stat.c newlib/libc/sys/sysnecv850/sys/syscall.h newlib/libc/sys/sysnecv850/time.c newlib/libc/sys/sysnecv850/times.c newlib/libc/sys/sysnecv850/trap.S newlib/libc/sys/sysnecv850/unlink.c newlib/libc/sys/sysnecv850/utime.c newlib/libc/sys/sysnecv850/wait.c newlib/libc/sys/sysnecv850/write.c newlib/libc/sys/sysvi386/Makefile.am newlib/libc/sys/sysvi386/Makefile.in newlib/libc/sys/sysvi386/_exit.s newlib/libc/sys/sysvi386/_longjmp.s newlib/libc/sys/sysvi386/_setjmp.s newlib/libc/sys/sysvi386/access.s newlib/libc/sys/sysvi386/aclocal.m4 newlib/libc/sys/sysvi386/alarm.s newlib/libc/sys/sysvi386/brk.s newlib/libc/sys/sysvi386/cerror.s newlib/libc/sys/sysvi386/chdir.s newlib/libc/sys/sysvi386/chmod.s newlib/libc/sys/sysvi386/close.s newlib/libc/sys/sysvi386/closedir.c newlib/libc/sys/sysvi386/configure newlib/libc/sys/sysvi386/configure.in newlib/libc/sys/sysvi386/crt0.c newlib/libc/sys/sysvi386/dup.c newlib/libc/sys/sysvi386/dup2.c newlib/libc/sys/sysvi386/exec.c newlib/libc/sys/sysvi386/execve.s newlib/libc/sys/sysvi386/fcntl.s newlib/libc/sys/sysvi386/fork.s newlib/libc/sys/sysvi386/fpathconf.s newlib/libc/sys/sysvi386/fps.s newlib/libc/sys/sysvi386/fpx.c newlib/libc/sys/sysvi386/fstat.s newlib/libc/sys/sysvi386/getdents.s newlib/libc/sys/sysvi386/getegid.s newlib/libc/sys/sysvi386/geteuid.s newlib/libc/sys/sysvi386/getgid.s newlib/libc/sys/sysvi386/getgroups.s newlib/libc/sys/sysvi386/getpid.s newlib/libc/sys/sysvi386/getuid.s newlib/libc/sys/sysvi386/ioctl.s newlib/libc/sys/sysvi386/isatty.c newlib/libc/sys/sysvi386/kill.s newlib/libc/sys/sysvi386/link.s newlib/libc/sys/sysvi386/lseek.s newlib/libc/sys/sysvi386/mkdir.s newlib/libc/sys/sysvi386/open.s newlib/libc/sys/sysvi386/opendir.c newlib/libc/sys/sysvi386/pathconf.s newlib/libc/sys/sysvi386/pause.s newlib/libc/sys/sysvi386/pipe.s newlib/libc/sys/sysvi386/read.s newlib/libc/sys/sysvi386/readdir.c newlib/libc/sys/sysvi386/rename.s newlib/libc/sys/sysvi386/rewinddir.c newlib/libc/sys/sysvi386/rmdir.s newlib/libc/sys/sysvi386/sbrk.c newlib/libc/sys/sysvi386/scandir.c newlib/libc/sys/sysvi386/seekdir.c newlib/libc/sys/sysvi386/setgid.s newlib/libc/sys/sysvi386/setuid.s newlib/libc/sys/sysvi386/sigaction.s newlib/libc/sys/sysvi386/signal.s newlib/libc/sys/sysvi386/sigprocmask.s newlib/libc/sys/sysvi386/sleep.c newlib/libc/sys/sysvi386/speed.c newlib/libc/sys/sysvi386/stat.s newlib/libc/sys/sysvi386/sys/dirent.h newlib/libc/sys/sysvi386/sys/setjmp.h newlib/libc/sys/sysvi386/sys/termio.h newlib/libc/sys/sysvi386/sys/termios.h newlib/libc/sys/sysvi386/sys/utime.h newlib/libc/sys/sysvi386/sys/utmp.h newlib/libc/sys/sysvi386/sys/wait.h newlib/libc/sys/sysvi386/sysconf.s newlib/libc/sys/sysvi386/tcgetattr.c newlib/libc/sys/sysvi386/tcline.c newlib/libc/sys/sysvi386/tcsetattr.c newlib/libc/sys/sysvi386/telldir.c newlib/libc/sys/sysvi386/time.s newlib/libc/sys/sysvi386/times.s newlib/libc/sys/sysvi386/unlink.s newlib/libc/sys/sysvi386/utime.s newlib/libc/sys/sysvi386/wait.s newlib/libc/sys/sysvi386/waitpid.s newlib/libc/sys/sysvi386/write.s newlib/libc/sys/sysvnecv70/Makefile.am newlib/libc/sys/sysvnecv70/Makefile.in newlib/libc/sys/sysvnecv70/aclocal.m4 newlib/libc/sys/sysvnecv70/cerror.s newlib/libc/sys/sysvnecv70/close.s newlib/libc/sys/sysvnecv70/configure newlib/libc/sys/sysvnecv70/configure.in newlib/libc/sys/sysvnecv70/crt0.s newlib/libc/sys/sysvnecv70/exit.s newlib/libc/sys/sysvnecv70/fps.s newlib/libc/sys/sysvnecv70/fpx.c newlib/libc/sys/sysvnecv70/fstat.s newlib/libc/sys/sysvnecv70/ioctl.s newlib/libc/sys/sysvnecv70/isatty.s newlib/libc/sys/sysvnecv70/lseek.s newlib/libc/sys/sysvnecv70/open.s newlib/libc/sys/sysvnecv70/read.s newlib/libc/sys/sysvnecv70/sbrk.s newlib/libc/sys/sysvnecv70/sysv60.s newlib/libc/sys/sysvnecv70/sysvnecv70.tex newlib/libc/sys/sysvnecv70/write.s newlib/libc/sys/tic80/Makefile.am newlib/libc/sys/tic80/Makefile.in newlib/libc/sys/tic80/aclocal.m4 newlib/libc/sys/tic80/configure newlib/libc/sys/tic80/configure.in newlib/libc/sys/tic80/crt0.c newlib/libc/sys/w65/Makefile.am newlib/libc/sys/w65/Makefile.in newlib/libc/sys/w65/aclocal.m4 newlib/libc/sys/w65/configure newlib/libc/sys/w65/configure.in newlib/libc/sys/w65/crt0.c newlib/libc/sys/w65/sys/syscall.h newlib/libc/sys/w65/syscalls.c newlib/libc/sys/w65/trap.c newlib/libc/sys/z8ksim/Makefile.am newlib/libc/sys/z8ksim/Makefile.in newlib/libc/sys/z8ksim/aclocal.m4 newlib/libc/sys/z8ksim/configure newlib/libc/sys/z8ksim/configure.in newlib/libc/sys/z8ksim/crt0.c newlib/libc/sys/z8ksim/glue.c newlib/libc/sys/z8ksim/sys/syscall.h newlib/libc/syscalls/Makefile.am newlib/libc/syscalls/Makefile.in newlib/libc/syscalls/sysclose.c newlib/libc/syscalls/sysexecve.c newlib/libc/syscalls/sysfcntl.c newlib/libc/syscalls/sysfork.c newlib/libc/syscalls/sysfstat.c newlib/libc/syscalls/sysgetpid.c newlib/libc/syscalls/sysgettod.c newlib/libc/syscalls/syskill.c newlib/libc/syscalls/syslink.c newlib/libc/syscalls/syslseek.c newlib/libc/syscalls/sysopen.c newlib/libc/syscalls/sysread.c newlib/libc/syscalls/syssbrk.c newlib/libc/syscalls/sysstat.c newlib/libc/syscalls/systimes.c newlib/libc/syscalls/sysunlink.c newlib/libc/syscalls/syswait.c newlib/libc/syscalls/syswrite.c newlib/libc/time/Makefile.am newlib/libc/time/Makefile.in newlib/libc/time/asctime.c newlib/libc/time/asctime_r.c newlib/libc/time/clock.c newlib/libc/time/ctime.c newlib/libc/time/ctime_r.c newlib/libc/time/difftime.c newlib/libc/time/gettzinfo.c newlib/libc/time/gmtime.c newlib/libc/time/gmtime_r.c newlib/libc/time/lcltime.c newlib/libc/time/lcltime_r.c newlib/libc/time/local.h newlib/libc/time/mktime.c newlib/libc/time/mktm_r.c newlib/libc/time/strftime.c newlib/libc/time/strptime.c newlib/libc/time/time.c newlib/libc/time/time.tex newlib/libc/time/tzlock.c newlib/libc/time/tzset.c newlib/libc/time/tzset_r.c newlib/libc/unix/Makefile.am newlib/libc/unix/Makefile.in newlib/libc/unix/basename.c newlib/libc/unix/dirname.c newlib/libc/unix/getcwd.c newlib/libc/unix/getlogin.c newlib/libc/unix/getpass.c newlib/libc/unix/getpwent.c newlib/libc/unix/getut.c newlib/libc/unix/pread.c newlib/libc/unix/pwrite.c newlib/libc/unix/sigset.c newlib/libc/unix/ttyname.c newlib/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_fdim.c newlib/libm/common/s_finite.c newlib/libm/common/s_fma.c newlib/libm/common/s_fmax.c newlib/libm/common/s_fmin.c newlib/libm/common/s_fpclassify.c newlib/libm/common/s_ilogb.c newlib/libm/common/s_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_lrint.c newlib/libm/common/s_lround.c newlib/libm/common/s_matherr.c newlib/libm/common/s_modf.c newlib/libm/common/s_nan.c newlib/libm/common/s_nearbyint.c newlib/libm/common/s_nextafter.c newlib/libm/common/s_remquo.c newlib/libm/common/s_rint.c newlib/libm/common/s_round.c newlib/libm/common/s_scalbln.c newlib/libm/common/s_scalbn.c newlib/libm/common/s_signbit.c newlib/libm/common/s_trunc.c newlib/libm/common/sf_cbrt.c newlib/libm/common/sf_copysign.c newlib/libm/common/sf_expm1.c newlib/libm/common/sf_fdim.c newlib/libm/common/sf_finite.c newlib/libm/common/sf_fma.c newlib/libm/common/sf_fmax.c newlib/libm/common/sf_fmin.c newlib/libm/common/sf_ilogb.c newlib/libm/common/sf_infinity.c newlib/libm/common/sf_log1p.c newlib/libm/common/sf_logb.c newlib/libm/common/sf_lrint.c newlib/libm/common/sf_lround.c newlib/libm/common/sf_modf.c newlib/libm/common/sf_nan.c newlib/libm/common/sf_nearbyint.c newlib/libm/common/sf_nextafter.c newlib/libm/common/sf_remquo.c newlib/libm/common/sf_rint.c newlib/libm/common/sf_round.c newlib/libm/common/sf_scalbln.c newlib/libm/common/sf_scalbn.c newlib/libm/common/sf_trunc.c newlib/libm/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_exp2.c newlib/libm/math/w_fmod.c newlib/libm/math/w_gamma.c newlib/libm/math/w_hypot.c newlib/libm/math/w_j0.c newlib/libm/math/w_j1.c newlib/libm/math/w_jn.c newlib/libm/math/w_lgamma.c newlib/libm/math/w_log.c newlib/libm/math/w_log10.c newlib/libm/math/w_pow.c newlib/libm/math/w_remainder.c newlib/libm/math/w_scalb.c newlib/libm/math/w_sincos.c newlib/libm/math/w_sinh.c newlib/libm/math/w_sqrt.c newlib/libm/math/w_tgamma.c newlib/libm/math/wf_acos.c newlib/libm/math/wf_acosh.c newlib/libm/math/wf_asin.c newlib/libm/math/wf_atan2.c newlib/libm/math/wf_atanh.c newlib/libm/math/wf_cabs.c newlib/libm/math/wf_cosh.c newlib/libm/math/wf_drem.c newlib/libm/math/wf_exp.c newlib/libm/math/wf_exp2.c newlib/libm/math/wf_fmod.c newlib/libm/math/wf_gamma.c newlib/libm/math/wf_hypot.c newlib/libm/math/wf_j0.c newlib/libm/math/wf_j1.c newlib/libm/math/wf_jn.c newlib/libm/math/wf_lgamma.c newlib/libm/math/wf_log.c newlib/libm/math/wf_log10.c newlib/libm/math/wf_pow.c newlib/libm/math/wf_remainder.c newlib/libm/math/wf_scalb.c newlib/libm/math/wf_sincos.c newlib/libm/math/wf_sinh.c newlib/libm/math/wf_sqrt.c newlib/libm/math/wf_tgamma.c newlib/libm/math/wr_gamma.c newlib/libm/math/wr_lgamma.c newlib/libm/math/wrf_gamma.c newlib/libm/math/wrf_lgamma.c newlib/libm/mathfp/Makefile.am newlib/libm/mathfp/Makefile.in newlib/libm/mathfp/e_acosh.c newlib/libm/mathfp/e_atanh.c newlib/libm/mathfp/e_hypot.c newlib/libm/mathfp/e_j0.c newlib/libm/mathfp/e_j1.c newlib/libm/mathfp/e_remainder.c newlib/libm/mathfp/e_scalb.c newlib/libm/mathfp/ef_acosh.c newlib/libm/mathfp/ef_atanh.c newlib/libm/mathfp/ef_hypot.c newlib/libm/mathfp/ef_j0.c newlib/libm/mathfp/ef_j1.c newlib/libm/mathfp/ef_remainder.c newlib/libm/mathfp/ef_scalb.c newlib/libm/mathfp/er_gamma.c newlib/libm/mathfp/er_lgamma.c newlib/libm/mathfp/erf_gamma.c newlib/libm/mathfp/erf_lgamma.c newlib/libm/mathfp/mathfp.tex newlib/libm/mathfp/s_acos.c newlib/libm/mathfp/s_asin.c newlib/libm/mathfp/s_asine.c newlib/libm/mathfp/s_asinh.c newlib/libm/mathfp/s_atan.c newlib/libm/mathfp/s_atan2.c newlib/libm/mathfp/s_atangent.c newlib/libm/mathfp/s_ceil.c newlib/libm/mathfp/s_cos.c newlib/libm/mathfp/s_cosh.c newlib/libm/mathfp/s_erf.c newlib/libm/mathfp/s_exp.c newlib/libm/mathfp/s_exp2.c newlib/libm/mathfp/s_fabs.c newlib/libm/mathfp/s_floor.c newlib/libm/mathfp/s_fmod.c newlib/libm/mathfp/s_frexp.c newlib/libm/mathfp/s_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_sincos.c newlib/libm/mathfp/s_sine.c newlib/libm/mathfp/s_sineh.c newlib/libm/mathfp/s_sinf.c newlib/libm/mathfp/s_sinh.c newlib/libm/mathfp/s_sqrt.c newlib/libm/mathfp/s_tan.c newlib/libm/mathfp/s_tanh.c newlib/libm/mathfp/s_tgamma.c newlib/libm/mathfp/sf_acos.c newlib/libm/mathfp/sf_asin.c newlib/libm/mathfp/sf_asine.c newlib/libm/mathfp/sf_asinh.c newlib/libm/mathfp/sf_atan.c newlib/libm/mathfp/sf_atan2.c newlib/libm/mathfp/sf_atangent.c newlib/libm/mathfp/sf_ceil.c newlib/libm/mathfp/sf_cos.c newlib/libm/mathfp/sf_cosh.c newlib/libm/mathfp/sf_erf.c newlib/libm/mathfp/sf_exp.c newlib/libm/mathfp/sf_exp2.c newlib/libm/mathfp/sf_fabs.c newlib/libm/mathfp/sf_floor.c newlib/libm/mathfp/sf_fmod.c newlib/libm/mathfp/sf_frexp.c newlib/libm/mathfp/sf_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_sincos.c newlib/libm/mathfp/sf_sine.c newlib/libm/mathfp/sf_sineh.c newlib/libm/mathfp/sf_sinh.c newlib/libm/mathfp/sf_sqrt.c newlib/libm/mathfp/sf_tan.c newlib/libm/mathfp/sf_tanh.c newlib/libm/mathfp/sf_tgamma.c newlib/libm/mathfp/w_cabs.c newlib/libm/mathfp/w_drem.c newlib/libm/mathfp/w_jn.c newlib/libm/mathfp/wf_cabs.c newlib/libm/mathfp/wf_drem.c newlib/libm/mathfp/wf_jn.c newlib/libm/mathfp/zmath.h newlib/libm/test/Makefile.in newlib/libm/test/acos_vec.c newlib/libm/test/acosf_vec.c newlib/libm/test/acosh_vec.c newlib/libm/test/acoshf_vec.c newlib/libm/test/asin_vec.c newlib/libm/test/asinf_vec.c newlib/libm/test/asinh_vec.c newlib/libm/test/asinhf_vec.c newlib/libm/test/atan2_vec.c newlib/libm/test/atan2f_vec.c newlib/libm/test/atan_vec.c newlib/libm/test/atanf_vec.c newlib/libm/test/atanh_vec.c newlib/libm/test/atanhf_vec.c newlib/libm/test/ceil_vec.c newlib/libm/test/ceilf_vec.c newlib/libm/test/conv_vec.c newlib/libm/test/convert.c newlib/libm/test/cos_vec.c newlib/libm/test/cosf_vec.c newlib/libm/test/cosh_vec.c newlib/libm/test/coshf_vec.c newlib/libm/test/dcvt.c newlib/libm/test/dvec.c newlib/libm/test/erf_vec.c newlib/libm/test/erfc_vec.c newlib/libm/test/erfcf_vec.c newlib/libm/test/erff_vec.c newlib/libm/test/exp_vec.c newlib/libm/test/expf_vec.c newlib/libm/test/fabs_vec.c newlib/libm/test/fabsf_vec.c newlib/libm/test/floor_vec.c newlib/libm/test/floorf_vec.c newlib/libm/test/fmod_vec.c newlib/libm/test/fmodf_vec.c newlib/libm/test/gamma_vec.c newlib/libm/test/gammaf_vec.c newlib/libm/test/hypot_vec.c newlib/libm/test/hypotf_vec.c newlib/libm/test/iconv_vec.c newlib/libm/test/j0_vec.c newlib/libm/test/j0f_vec.c newlib/libm/test/j1_vec.c newlib/libm/test/j1f_vec.c newlib/libm/test/jn_vec.c newlib/libm/test/jnf_vec.c newlib/libm/test/log10_vec.c newlib/libm/test/log10f_vec.c newlib/libm/test/log1p_vec.c newlib/libm/test/log1pf_vec.c newlib/libm/test/log2_vec.c newlib/libm/test/log2f_vec.c newlib/libm/test/log_vec.c newlib/libm/test/logf_vec.c newlib/libm/test/math.c newlib/libm/test/math2.c newlib/libm/test/sin_vec.c newlib/libm/test/sinf_vec.c newlib/libm/test/sinh_vec.c newlib/libm/test/sinhf_vec.c newlib/libm/test/sprint_ivec.c newlib/libm/test/sprint_vec.c newlib/libm/test/sqrt_vec.c newlib/libm/test/sqrtf_vec.c newlib/libm/test/string.c newlib/libm/test/tan_vec.c newlib/libm/test/tanf_vec.c newlib/libm/test/tanh_vec.c newlib/libm/test/tanhf_vec.c newlib/libm/test/test.c newlib/libm/test/test.h newlib/libm/test/test_ieee.c newlib/libm/test/test_is.c newlib/libm/test/y0_vec.c newlib/libm/test/y0f_vec.c newlib/libm/test/y1_vec.c newlib/libm/test/y1f_vec.c newlib/libm/test/yn_vec.c newlib/libm/test/ynf_vec.c newlib/libtool.m4 newlib/newlib.hin newlib/stamp-h.in newlib/testsuite/config/default.exp newlib/testsuite/include/check.h newlib/testsuite/lib/checkoutput.exp newlib/testsuite/lib/flags.exp newlib/testsuite/lib/newlib.exp newlib/testsuite/lib/passfail.exp newlib/testsuite/newlib.elix/elix.exp newlib/testsuite/newlib.elix/tmmap.c newlib/testsuite/newlib.iconv/iconv.exp newlib/testsuite/newlib.iconv/iconvjp.c newlib/testsuite/newlib.iconv/iconvnm.c newlib/testsuite/newlib.iconv/iconvru.c newlib/testsuite/newlib.locale/UTF-8.c newlib/testsuite/newlib.locale/UTF-8.exp newlib/testsuite/newlib.locale/locale.exp newlib/testsuite/newlib.search/hsearchtest.c newlib/testsuite/newlib.search/hsearchtest.exp newlib/testsuite/newlib.stdlib/atexit.c newlib/testsuite/newlib.stdlib/atexit.exp newlib/testsuite/newlib.string/memmove1.c newlib/testsuite/newlib.string/string.exp newlib/testsuite/newlib.string/tstring.c newlib/testsuite/newlib.wctype/tiswctype.c newlib/testsuite/newlib.wctype/twctrans.c newlib/testsuite/newlib.wctype/twctype.c newlib/testsuite/newlib.wctype/wctype.exp winsup/CYGWIN_LICENSE winsup/ChangeLog winsup/Makefile.common winsup/Makefile.in winsup/configure winsup/configure.in winsup/cygserver/ChangeLog winsup/cygserver/Makefile.in winsup/cygserver/README winsup/cygserver/bsd_helper.cc winsup/cygserver/bsd_helper.h winsup/cygserver/bsd_log.cc winsup/cygserver/bsd_log.h winsup/cygserver/bsd_mutex.cc winsup/cygserver/bsd_mutex.h winsup/cygserver/client.cc winsup/cygserver/configure winsup/cygserver/configure.in winsup/cygserver/cygserver-config winsup/cygserver/cygserver.cc winsup/cygserver/cygserver.conf winsup/cygserver/msg.cc winsup/cygserver/process.cc winsup/cygserver/process.h winsup/cygserver/sem.cc winsup/cygserver/shm.cc winsup/cygserver/sysv_msg.cc winsup/cygserver/sysv_sem.cc winsup/cygserver/sysv_shm.cc winsup/cygserver/threaded_queue.cc winsup/cygserver/threaded_queue.h winsup/cygserver/transport.cc winsup/cygserver/transport.h winsup/cygserver/transport_pipes.cc winsup/cygserver/transport_pipes.h winsup/cygserver/transport_sockets.cc winsup/cygserver/transport_sockets.h winsup/cygserver/woutsup.h winsup/cygwin/CYGWIN_LICENSE winsup/cygwin/ChangeLog winsup/cygwin/ChangeLog-1995 winsup/cygwin/ChangeLog-1996 winsup/cygwin/ChangeLog-1997 winsup/cygwin/ChangeLog-1998 winsup/cygwin/ChangeLog-1999 winsup/cygwin/ChangeLog-2000 winsup/cygwin/ChangeLog-2001 winsup/cygwin/ChangeLog-2002 winsup/cygwin/ChangeLog-2003 winsup/cygwin/ChangeLog-2004 winsup/cygwin/Makefile.in winsup/cygwin/ROADMAP winsup/cygwin/acconfig.h winsup/cygwin/ansi.sgml winsup/cygwin/assert.cc winsup/cygwin/autoload.cc winsup/cygwin/automode.c winsup/cygwin/binmode.c winsup/cygwin/child_info.h winsup/cygwin/config.h.in winsup/cygwin/config/i386/profile.h winsup/cygwin/configure winsup/cygwin/configure.in winsup/cygwin/cpuid.h winsup/cygwin/crt0.c winsup/cygwin/ctype.cc winsup/cygwin/cxx.cc winsup/cygwin/cygerrno.h winsup/cygwin/cygheap.cc winsup/cygwin/cygheap.h winsup/cygwin/cygmagic winsup/cygwin/cygmalloc.h winsup/cygwin/cygserver.h winsup/cygwin/cygserver_ipc.h winsup/cygwin/cygserver_msg.h winsup/cygwin/cygserver_sem.h winsup/cygwin/cygserver_shm.h winsup/cygwin/cygthread.cc winsup/cygwin/cygthread.h winsup/cygwin/cygtls.cc winsup/cygwin/cygtls.h winsup/cygwin/cygwin-shilka winsup/cygwin/cygwin.din winsup/cygwin/cygwin.sc winsup/cygwin/cygwin_version.h winsup/cygwin/dcrt0.cc winsup/cygwin/debug.cc winsup/cygwin/debug.h winsup/cygwin/delqueue.cc winsup/cygwin/devices.cc winsup/cygwin/devices.h winsup/cygwin/devices.in winsup/cygwin/dir.cc winsup/cygwin/dlfcn.cc winsup/cygwin/dll_init.cc winsup/cygwin/dll_init.h winsup/cygwin/dll_init.sgml winsup/cygwin/dlmalloc.c winsup/cygwin/dlmalloc.h winsup/cygwin/dtable.cc winsup/cygwin/dtable.h winsup/cygwin/dtable.sgml winsup/cygwin/environ.cc winsup/cygwin/environ.h winsup/cygwin/errno.cc winsup/cygwin/exceptions.cc winsup/cygwin/exec.cc winsup/cygwin/external.cc winsup/cygwin/external.sgml winsup/cygwin/fcntl.cc winsup/cygwin/fhandler.cc winsup/cygwin/fhandler.h winsup/cygwin/fhandler_clipboard.cc winsup/cygwin/fhandler_console.cc winsup/cygwin/fhandler_disk_file.cc winsup/cygwin/fhandler_dsp.cc winsup/cygwin/fhandler_fifo.cc winsup/cygwin/fhandler_floppy.cc winsup/cygwin/fhandler_mailslot.cc winsup/cygwin/fhandler_mem.cc winsup/cygwin/fhandler_netdrive.cc winsup/cygwin/fhandler_nodevice.cc winsup/cygwin/fhandler_proc.cc winsup/cygwin/fhandler_process.cc winsup/cygwin/fhandler_random.cc winsup/cygwin/fhandler_raw.cc winsup/cygwin/fhandler_registry.cc winsup/cygwin/fhandler_serial.cc winsup/cygwin/fhandler_socket.cc winsup/cygwin/fhandler_tape.cc winsup/cygwin/fhandler_termios.cc winsup/cygwin/fhandler_tty.cc winsup/cygwin/fhandler_virtual.cc winsup/cygwin/fhandler_windows.cc winsup/cygwin/fhandler_zero.cc winsup/cygwin/flock.cc winsup/cygwin/fork.cc winsup/cygwin/gcrt0.c winsup/cygwin/gendef winsup/cygwin/gendevices winsup/cygwin/gentls_offsets winsup/cygwin/glob.c winsup/cygwin/gmon.c winsup/cygwin/gmon.h winsup/cygwin/grp.cc winsup/cygwin/heap.cc winsup/cygwin/heap.h winsup/cygwin/hires.h winsup/cygwin/hookapi.cc winsup/cygwin/how-autoload-works.txt winsup/cygwin/how-cygheap-works.txt winsup/cygwin/how-fhandlers-work.txt winsup/cygwin/how-signals-work.txt winsup/cygwin/how-spawn-works.txt winsup/cygwin/how-to-debug-cygwin.txt winsup/cygwin/how-vfork-works.txt winsup/cygwin/include/a.out.h winsup/cygwin/include/arpa/ftp.h winsup/cygwin/include/arpa/inet.h winsup/cygwin/include/arpa/telnet.h winsup/cygwin/include/asm/byteorder.h winsup/cygwin/include/asm/socket.h winsup/cygwin/include/asm/types.h winsup/cygwin/include/ctype.h winsup/cygwin/include/cygwin/_types.h winsup/cygwin/include/cygwin/acl.h winsup/cygwin/include/cygwin/config.h winsup/cygwin/include/cygwin/core_dump.h winsup/cygwin/include/cygwin/cygwin_dll.h winsup/cygwin/include/cygwin/fs.h winsup/cygwin/include/cygwin/grp.h winsup/cygwin/include/cygwin/hdreg.h winsup/cygwin/include/cygwin/icmp.h winsup/cygwin/include/cygwin/if.h winsup/cygwin/include/cygwin/in.h winsup/cygwin/include/cygwin/in_systm.h winsup/cygwin/include/cygwin/ipc.h winsup/cygwin/include/cygwin/msg.h winsup/cygwin/include/cygwin/mtio.h winsup/cygwin/include/cygwin/rdevio.h winsup/cygwin/include/cygwin/sem.h winsup/cygwin/include/cygwin/shm.h winsup/cygwin/include/cygwin/signal.h winsup/cygwin/include/cygwin/socket.h winsup/cygwin/include/cygwin/sockios.h winsup/cygwin/include/cygwin/stat.h winsup/cygwin/include/cygwin/sysproto.h winsup/cygwin/include/cygwin/types.h winsup/cygwin/include/cygwin/uio.h winsup/cygwin/include/cygwin/utmp.h winsup/cygwin/include/cygwin/version.h winsup/cygwin/include/dlfcn.h winsup/cygwin/include/endian.h winsup/cygwin/include/err.h winsup/cygwin/include/exceptions.h winsup/cygwin/include/fcntl.h winsup/cygwin/include/features.h winsup/cygwin/include/fnmatch.h winsup/cygwin/include/getopt.h winsup/cygwin/include/glob.h winsup/cygwin/include/icmp.h winsup/cygwin/include/inttypes.h winsup/cygwin/include/io.h winsup/cygwin/include/lastlog.h winsup/cygwin/include/libgen.h winsup/cygwin/include/limits.h winsup/cygwin/include/mapi.h winsup/cygwin/include/memory.h winsup/cygwin/include/mntent.h winsup/cygwin/include/net/if.h winsup/cygwin/include/netdb.h winsup/cygwin/include/netinet/in.h winsup/cygwin/include/netinet/in_systm.h winsup/cygwin/include/netinet/ip.h winsup/cygwin/include/netinet/ip_icmp.h winsup/cygwin/include/netinet/tcp.h winsup/cygwin/include/netinet/udp.h winsup/cygwin/include/paths.h winsup/cygwin/include/poll.h winsup/cygwin/include/pthread.h winsup/cygwin/include/pty.h winsup/cygwin/include/sched.h winsup/cygwin/include/search.h winsup/cygwin/include/semaphore.h winsup/cygwin/include/stdint.h winsup/cygwin/include/strings.h winsup/cygwin/include/sys/acl.h winsup/cygwin/include/sys/cdefs.h winsup/cygwin/include/sys/copying.dj winsup/cygwin/include/sys/cygwin.h winsup/cygwin/include/sys/dirent.h winsup/cygwin/include/sys/file.h winsup/cygwin/include/sys/ioctl.h winsup/cygwin/include/sys/ipc.h winsup/cygwin/include/sys/lock.h winsup/cygwin/include/sys/mman.h winsup/cygwin/include/sys/mount.h winsup/cygwin/include/sys/msg.h winsup/cygwin/include/sys/mtio.h winsup/cygwin/include/sys/param.h winsup/cygwin/include/sys/poll.h winsup/cygwin/include/sys/procfs.h winsup/cygwin/include/sys/queue.h winsup/cygwin/include/sys/resource.h winsup/cygwin/include/sys/select.h winsup/cygwin/include/sys/sem.h winsup/cygwin/include/sys/shm.h winsup/cygwin/include/sys/smallprint.h winsup/cygwin/include/sys/socket.h winsup/cygwin/include/sys/soundcard.h winsup/cygwin/include/sys/statfs.h winsup/cygwin/include/sys/statvfs.h winsup/cygwin/include/sys/stdio.h winsup/cygwin/include/sys/strace.h winsup/cygwin/include/sys/syslog.h winsup/cygwin/include/sys/sysmacros.h winsup/cygwin/include/sys/sysproto.h winsup/cygwin/include/sys/termio.h winsup/cygwin/include/sys/termios.h winsup/cygwin/include/sys/ttychars.h winsup/cygwin/include/sys/uio.h winsup/cygwin/include/sys/un.h winsup/cygwin/include/sys/utime.h winsup/cygwin/include/sys/utmp.h winsup/cygwin/include/sys/utsname.h winsup/cygwin/include/sys/vfs.h winsup/cygwin/include/sys/wait.h winsup/cygwin/include/sysexits.h winsup/cygwin/include/syslog.h winsup/cygwin/include/termio.h winsup/cygwin/include/tzfile.h winsup/cygwin/include/utmpx.h winsup/cygwin/init.cc winsup/cygwin/ioctl.cc winsup/cygwin/ipc.cc winsup/cygwin/lib/_cygwin_crt0_common.cc winsup/cygwin/lib/crt0.h winsup/cygwin/lib/cygwin_attach_dll.c winsup/cygwin/lib/cygwin_crt0.c winsup/cygwin/lib/dll_entry.c winsup/cygwin/lib/dll_main.cc winsup/cygwin/lib/libcmain.c winsup/cygwin/lib/premain0.c winsup/cygwin/lib/premain1.c winsup/cygwin/lib/premain2.c winsup/cygwin/lib/premain3.c winsup/cygwin/lib/pseudo-reloc.c winsup/cygwin/libc/bsdlib.cc winsup/cygwin/libc/fnmatch.c winsup/cygwin/libc/getopt.c winsup/cygwin/libc/iruserok.c winsup/cygwin/localtime.cc winsup/cygwin/lsearch.cc winsup/cygwin/malloc.cc winsup/cygwin/malloc_wrapper.cc winsup/cygwin/mcount.c winsup/cygwin/misc-std.sgml winsup/cygwin/miscfuncs.cc winsup/cygwin/mktemp.cc winsup/cygwin/mkvers.sh winsup/cygwin/mmap.cc winsup/cygwin/msg.cc winsup/cygwin/mtinfo.h winsup/cygwin/net.cc winsup/cygwin/netdb.cc winsup/cygwin/newsym winsup/cygwin/ntdll.h winsup/cygwin/ntea.cc winsup/cygwin/passwd.cc winsup/cygwin/path.cc winsup/cygwin/path.h winsup/cygwin/path.sgml winsup/cygwin/perprocess.h winsup/cygwin/pinfo.cc winsup/cygwin/pinfo.h winsup/cygwin/pipe.cc winsup/cygwin/poll.cc winsup/cygwin/posix.sgml winsup/cygwin/profil.c winsup/cygwin/profil.h winsup/cygwin/pseudo-reloc.cc winsup/cygwin/pthread.cc winsup/cygwin/pwdgrp.h winsup/cygwin/regex/COPYRIGHT winsup/cygwin/regex/cclass.h winsup/cygwin/regex/cname.h winsup/cygwin/regex/engine.c winsup/cygwin/regex/engine.ih winsup/cygwin/regex/mkh winsup/cygwin/regex/regcomp.c winsup/cygwin/regex/regcomp.ih winsup/cygwin/regex/regerror.c winsup/cygwin/regex/regerror.ih winsup/cygwin/regex/regex.3 winsup/cygwin/regex/regex.7 winsup/cygwin/regex/regex.h winsup/cygwin/regex/regex2.h winsup/cygwin/regex/regexec.c winsup/cygwin/regex/regfree.c winsup/cygwin/regex/tests winsup/cygwin/regex/utils.h winsup/cygwin/regexp/COPYRIGHT winsup/cygwin/regexp/README winsup/cygwin/regexp/regexp.h winsup/cygwin/regexp/regmagic.h winsup/cygwin/regexp/v8_regerror.c winsup/cygwin/regexp/v8_regexp.c winsup/cygwin/regexp/v8_regsub.c winsup/cygwin/registry.cc winsup/cygwin/registry.h winsup/cygwin/resource.cc winsup/cygwin/rmsym winsup/cygwin/scandir.cc winsup/cygwin/sched.cc winsup/cygwin/sec_acl.cc winsup/cygwin/sec_helper.cc winsup/cygwin/security.cc winsup/cygwin/security.h winsup/cygwin/select.cc winsup/cygwin/select.h winsup/cygwin/sem.cc winsup/cygwin/shared.cc winsup/cygwin/shared.sgml winsup/cygwin/shared_info.h winsup/cygwin/shm.cc winsup/cygwin/signal.cc winsup/cygwin/sigproc.cc winsup/cygwin/sigproc.h winsup/cygwin/smallprint.c winsup/cygwin/spawn.cc winsup/cygwin/speclib winsup/cygwin/stackdump.sgml winsup/cygwin/strace.cc winsup/cygwin/string.h winsup/cygwin/strsep.cc winsup/cygwin/strsig.cc winsup/cygwin/sync.cc winsup/cygwin/sync.h winsup/cygwin/syscalls.cc winsup/cygwin/sysconf.cc winsup/cygwin/syslog.cc winsup/cygwin/termios.cc winsup/cygwin/textmode.c winsup/cygwin/textreadmode.c winsup/cygwin/thread.cc winsup/cygwin/thread.h winsup/cygwin/timer.cc winsup/cygwin/times.cc winsup/cygwin/tlsoffsets.h winsup/cygwin/tty.cc winsup/cygwin/tty.h winsup/cygwin/tz_posixrules.h winsup/cygwin/uinfo.cc winsup/cygwin/uname.cc winsup/cygwin/wait.cc winsup/cygwin/winbase.h winsup/cygwin/wincap.cc winsup/cygwin/wincap.h winsup/cygwin/window.cc winsup/cygwin/wininfo.h winsup/cygwin/winsup.h winsup/cygwin/winver.rc winsup/doc/ChangeLog winsup/doc/Makefile.in winsup/doc/README winsup/doc/calls.texinfo winsup/doc/changes.texinfo winsup/doc/configure winsup/doc/configure.in winsup/doc/copy.texinfo winsup/doc/cygserver.sgml winsup/doc/cygwin-api.in.sgml winsup/doc/cygwin-ug-net.in.sgml winsup/doc/cygwin-ug.in.sgml winsup/doc/cygwin.dsl winsup/doc/cygwinenv.sgml winsup/doc/dll.sgml winsup/doc/doctool.c winsup/doc/doctool.txt winsup/doc/effectively.sgml winsup/doc/faq.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/CONTRIBUTORS winsup/mingw/CRT_fp10.c winsup/mingw/CRT_fp8.c winsup/mingw/CRT_noglob.c winsup/mingw/CRTfmode.c winsup/mingw/CRTglob.c winsup/mingw/CRTinit.c winsup/mingw/ChangeLog winsup/mingw/DISCLAIMER winsup/mingw/Makefile.in winsup/mingw/README winsup/mingw/TODO winsup/mingw/binmode.c 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/dllcrt1.c winsup/mingw/dllmain.c winsup/mingw/gccmain.c winsup/mingw/include/_mingw.h winsup/mingw/include/assert.h winsup/mingw/include/complex.h winsup/mingw/include/conio.h winsup/mingw/include/ctype.h winsup/mingw/include/dir.h winsup/mingw/include/direct.h winsup/mingw/include/dirent.h winsup/mingw/include/dos.h winsup/mingw/include/errno.h winsup/mingw/include/excpt.h winsup/mingw/include/fcntl.h winsup/mingw/include/fenv.h winsup/mingw/include/float.h winsup/mingw/include/getopt.h winsup/mingw/include/inttypes.h winsup/mingw/include/io.h winsup/mingw/include/limits.h winsup/mingw/include/locale.h winsup/mingw/include/malloc.h winsup/mingw/include/math.h winsup/mingw/include/mbctype.h winsup/mingw/include/mbstring.h winsup/mingw/include/mem.h winsup/mingw/include/memory.h winsup/mingw/include/process.h winsup/mingw/include/search.h winsup/mingw/include/setjmp.h winsup/mingw/include/share.h winsup/mingw/include/signal.h winsup/mingw/include/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/param.h winsup/mingw/include/sys/stat.h winsup/mingw/include/sys/time.h winsup/mingw/include/sys/timeb.h winsup/mingw/include/sys/types.h winsup/mingw/include/sys/unistd.h winsup/mingw/include/sys/utime.h winsup/mingw/include/tchar.h winsup/mingw/include/time.h winsup/mingw/include/unistd.h winsup/mingw/include/utime.h winsup/mingw/include/values.h winsup/mingw/include/varargs.h winsup/mingw/include/wchar.h winsup/mingw/include/wctype.h winsup/mingw/init.c winsup/mingw/install-sh winsup/mingw/isascii.c winsup/mingw/iscsym.c winsup/mingw/iscsymf.c winsup/mingw/jamfile winsup/mingw/main.c winsup/mingw/mingwex/Makefile.in winsup/mingw/mingwex/_Exit.c winsup/mingw/mingwex/atoll.c winsup/mingw/mingwex/btowc.c winsup/mingw/mingwex/complex/cabs.c winsup/mingw/mingwex/complex/cabsf.c winsup/mingw/mingwex/complex/cabsl.c winsup/mingw/mingwex/complex/cacos.c winsup/mingw/mingwex/complex/cacosf.c winsup/mingw/mingwex/complex/cacosh.c winsup/mingw/mingwex/complex/cacoshf.c winsup/mingw/mingwex/complex/cacoshl.c winsup/mingw/mingwex/complex/cacosl.c winsup/mingw/mingwex/complex/carg.c winsup/mingw/mingwex/complex/cargf.c winsup/mingw/mingwex/complex/cargl.c winsup/mingw/mingwex/complex/casin.c winsup/mingw/mingwex/complex/casinf.c winsup/mingw/mingwex/complex/casinh.c winsup/mingw/mingwex/complex/casinhf.c winsup/mingw/mingwex/complex/casinhl.c winsup/mingw/mingwex/complex/casinl.c winsup/mingw/mingwex/complex/catan.c winsup/mingw/mingwex/complex/catanf.c winsup/mingw/mingwex/complex/catanh.c winsup/mingw/mingwex/complex/catanhf.c winsup/mingw/mingwex/complex/catanhl.c winsup/mingw/mingwex/complex/catanl.c winsup/mingw/mingwex/complex/ccos.c winsup/mingw/mingwex/complex/ccosf.c winsup/mingw/mingwex/complex/ccosh.c winsup/mingw/mingwex/complex/ccoshf.c winsup/mingw/mingwex/complex/ccoshl.c winsup/mingw/mingwex/complex/ccosl.c winsup/mingw/mingwex/complex/cexp.c winsup/mingw/mingwex/complex/cexpf.c winsup/mingw/mingwex/complex/cexpl.c winsup/mingw/mingwex/complex/cimag.c winsup/mingw/mingwex/complex/cimagf.c winsup/mingw/mingwex/complex/cimagl.c winsup/mingw/mingwex/complex/clog.c winsup/mingw/mingwex/complex/clogf.c winsup/mingw/mingwex/complex/clogl.c winsup/mingw/mingwex/complex/cpow.c winsup/mingw/mingwex/complex/cpowf.c winsup/mingw/mingwex/complex/cpowl.c winsup/mingw/mingwex/complex/cproj.c winsup/mingw/mingwex/complex/cprojf.c winsup/mingw/mingwex/complex/cprojl.c winsup/mingw/mingwex/complex/creal.c winsup/mingw/mingwex/complex/crealf.c winsup/mingw/mingwex/complex/creall.c winsup/mingw/mingwex/complex/csin.c winsup/mingw/mingwex/complex/csinf.c winsup/mingw/mingwex/complex/csinh.c winsup/mingw/mingwex/complex/csinhf.c winsup/mingw/mingwex/complex/csinhl.c winsup/mingw/mingwex/complex/csinl.c winsup/mingw/mingwex/complex/csqrt.c winsup/mingw/mingwex/complex/csqrtf.c winsup/mingw/mingwex/complex/csqrtl.c winsup/mingw/mingwex/complex/ctan.c winsup/mingw/mingwex/complex/ctanf.c winsup/mingw/mingwex/complex/ctanh.c winsup/mingw/mingwex/complex/ctanhf.c winsup/mingw/mingwex/complex/ctanhl.c winsup/mingw/mingwex/complex/ctanl.c winsup/mingw/mingwex/configure winsup/mingw/mingwex/configure.in winsup/mingw/mingwex/dirent.c winsup/mingw/mingwex/feclearexcept.c winsup/mingw/mingwex/fegetenv.c winsup/mingw/mingwex/fegetexceptflag.c winsup/mingw/mingwex/fegetround.c winsup/mingw/mingwex/feholdexcept.c winsup/mingw/mingwex/feraiseexcept.c winsup/mingw/mingwex/fesetenv.c winsup/mingw/mingwex/fesetexceptflag.c winsup/mingw/mingwex/fesetround.c winsup/mingw/mingwex/fetestexcept.c winsup/mingw/mingwex/feupdateenv.c winsup/mingw/mingwex/ftruncate.c winsup/mingw/mingwex/fwide.c winsup/mingw/mingwex/getopt.c winsup/mingw/mingwex/imaxabs.c winsup/mingw/mingwex/imaxdiv.c winsup/mingw/mingwex/ldtoa.c winsup/mingw/mingwex/lltoa.c winsup/mingw/mingwex/lltow.c winsup/mingw/mingwex/math/acosf.c winsup/mingw/mingwex/math/acosh.c winsup/mingw/mingwex/math/acoshf.c winsup/mingw/mingwex/math/acoshl.c winsup/mingw/mingwex/math/acosl.c winsup/mingw/mingwex/math/asinf.c winsup/mingw/mingwex/math/asinh.c winsup/mingw/mingwex/math/asinhf.c winsup/mingw/mingwex/math/asinhl.c winsup/mingw/mingwex/math/asinl.c winsup/mingw/mingwex/math/atan2f.c winsup/mingw/mingwex/math/atan2l.c winsup/mingw/mingwex/math/atanf.c winsup/mingw/mingwex/math/atanh.c winsup/mingw/mingwex/math/atanhf.c winsup/mingw/mingwex/math/atanhl.c winsup/mingw/mingwex/math/atanl.c winsup/mingw/mingwex/math/cbrt.c winsup/mingw/mingwex/math/cbrtf.c winsup/mingw/mingwex/math/cbrtl.c winsup/mingw/mingwex/math/ceilf.S winsup/mingw/mingwex/math/ceill.S winsup/mingw/mingwex/math/cephes_emath.c winsup/mingw/mingwex/math/cephes_emath.h winsup/mingw/mingwex/math/cephes_mconf.h winsup/mingw/mingwex/math/copysign.S winsup/mingw/mingwex/math/copysignf.S winsup/mingw/mingwex/math/copysignl.S winsup/mingw/mingwex/math/cosf.S winsup/mingw/mingwex/math/coshf.c winsup/mingw/mingwex/math/coshl.c winsup/mingw/mingwex/math/cosl.S winsup/mingw/mingwex/math/erfl.c winsup/mingw/mingwex/math/exp2.S winsup/mingw/mingwex/math/exp2f.S winsup/mingw/mingwex/math/exp2l.S winsup/mingw/mingwex/math/expf.c winsup/mingw/mingwex/math/expl.c winsup/mingw/mingwex/math/expm1.c winsup/mingw/mingwex/math/expm1f.c winsup/mingw/mingwex/math/expm1l.c winsup/mingw/mingwex/math/fabs.c winsup/mingw/mingwex/math/fabsf.c winsup/mingw/mingwex/math/fabsl.c winsup/mingw/mingwex/math/fastmath.h winsup/mingw/mingwex/math/fdim.c winsup/mingw/mingwex/math/fdimf.c winsup/mingw/mingwex/math/fdiml.c winsup/mingw/mingwex/math/floorf.S winsup/mingw/mingwex/math/floorl.S winsup/mingw/mingwex/math/fma.S winsup/mingw/mingwex/math/fmaf.S winsup/mingw/mingwex/math/fmal.c winsup/mingw/mingwex/math/fmax.c winsup/mingw/mingwex/math/fmaxf.c winsup/mingw/mingwex/math/fmaxl.c winsup/mingw/mingwex/math/fmin.c winsup/mingw/mingwex/math/fminf.c winsup/mingw/mingwex/math/fminl.c winsup/mingw/mingwex/math/fmodf.c winsup/mingw/mingwex/math/fmodl.c winsup/mingw/mingwex/math/fp_consts.c winsup/mingw/mingwex/math/fp_consts.h winsup/mingw/mingwex/math/fp_constsf.c winsup/mingw/mingwex/math/fp_constsl.c winsup/mingw/mingwex/math/fpclassify.c winsup/mingw/mingwex/math/fpclassifyf.c winsup/mingw/mingwex/math/fpclassifyl.c winsup/mingw/mingwex/math/frexpf.c winsup/mingw/mingwex/math/frexpl.S winsup/mingw/mingwex/math/fucom.c winsup/mingw/mingwex/math/hypotf.c winsup/mingw/mingwex/math/hypotl.c winsup/mingw/mingwex/math/ilogb.S winsup/mingw/mingwex/math/ilogbf.S winsup/mingw/mingwex/math/ilogbl.S winsup/mingw/mingwex/math/isnan.c winsup/mingw/mingwex/math/isnanf.c winsup/mingw/mingwex/math/isnanl.c winsup/mingw/mingwex/math/ldexpf.c winsup/mingw/mingwex/math/ldexpl.c winsup/mingw/mingwex/math/lgamma.c winsup/mingw/mingwex/math/lgammaf.c winsup/mingw/mingwex/math/lgammal.c winsup/mingw/mingwex/math/llrint.c winsup/mingw/mingwex/math/llrintf.c winsup/mingw/mingwex/math/llrintl.c winsup/mingw/mingwex/math/llround.c winsup/mingw/mingwex/math/llroundf.c winsup/mingw/mingwex/math/llroundl.c winsup/mingw/mingwex/math/log10f.S winsup/mingw/mingwex/math/log10l.S winsup/mingw/mingwex/math/log1p.S winsup/mingw/mingwex/math/log1pf.S winsup/mingw/mingwex/math/log1pl.S winsup/mingw/mingwex/math/log2.S winsup/mingw/mingwex/math/log2f.S winsup/mingw/mingwex/math/log2l.S winsup/mingw/mingwex/math/logb.c winsup/mingw/mingwex/math/logbf.c winsup/mingw/mingwex/math/logbl.c winsup/mingw/mingwex/math/logf.S winsup/mingw/mingwex/math/logl.S winsup/mingw/mingwex/math/lrint.c winsup/mingw/mingwex/math/lrintf.c winsup/mingw/mingwex/math/lrintl.c winsup/mingw/mingwex/math/lround.c winsup/mingw/mingwex/math/lroundf.c winsup/mingw/mingwex/math/lroundl.c winsup/mingw/mingwex/math/modff.c winsup/mingw/mingwex/math/modfl.c winsup/mingw/mingwex/math/nearbyint.S winsup/mingw/mingwex/math/nearbyintf.S winsup/mingw/mingwex/math/nearbyintl.S winsup/mingw/mingwex/math/nextafterf.c winsup/mingw/mingwex/math/nextafterl.c winsup/mingw/mingwex/math/nexttoward.c winsup/mingw/mingwex/math/nexttowardf.c winsup/mingw/mingwex/math/pow.c winsup/mingw/mingwex/math/powf.c winsup/mingw/mingwex/math/powi.c winsup/mingw/mingwex/math/powif.c winsup/mingw/mingwex/math/powil.c winsup/mingw/mingwex/math/powl.c winsup/mingw/mingwex/math/remainder.S winsup/mingw/mingwex/math/remainderf.S winsup/mingw/mingwex/math/remainderl.S winsup/mingw/mingwex/math/remquo.S winsup/mingw/mingwex/math/remquof.S winsup/mingw/mingwex/math/remquol.S winsup/mingw/mingwex/math/rint.c winsup/mingw/mingwex/math/rintf.c winsup/mingw/mingwex/math/rintl.c winsup/mingw/mingwex/math/round.c winsup/mingw/mingwex/math/roundf.c winsup/mingw/mingwex/math/roundl.c winsup/mingw/mingwex/math/s_erf.c winsup/mingw/mingwex/math/scalbn.S winsup/mingw/mingwex/math/scalbnf.S winsup/mingw/mingwex/math/scalbnl.S winsup/mingw/mingwex/math/sf_erf.c winsup/mingw/mingwex/math/signbit.c winsup/mingw/mingwex/math/signbitf.c winsup/mingw/mingwex/math/signbitl.c winsup/mingw/mingwex/math/sinf.S winsup/mingw/mingwex/math/sinhf.c winsup/mingw/mingwex/math/sinhl.c winsup/mingw/mingwex/math/sinl.S winsup/mingw/mingwex/math/sqrtf.c winsup/mingw/mingwex/math/sqrtl.c winsup/mingw/mingwex/math/tanf.S winsup/mingw/mingwex/math/tanhf.c winsup/mingw/mingwex/math/tanhl.c winsup/mingw/mingwex/math/tanl.S winsup/mingw/mingwex/math/tgamma.c winsup/mingw/mingwex/math/tgammaf.c winsup/mingw/mingwex/math/tgammal.c winsup/mingw/mingwex/math/trunc.c winsup/mingw/mingwex/math/truncf.c winsup/mingw/mingwex/math/truncl.c winsup/mingw/mingwex/mb_wc_common.h winsup/mingw/mingwex/mbrtowc.c winsup/mingw/mingwex/mbsinit.c winsup/mingw/mingwex/mingw-aligned-malloc.c winsup/mingw/mingwex/mingw-fseek.c winsup/mingw/mingwex/sitest.c winsup/mingw/mingwex/stdio/fopen64.c winsup/mingw/mingwex/stdio/fseeko64.c winsup/mingw/mingwex/stdio/ftello64.c winsup/mingw/mingwex/stdio/lseek64.c winsup/mingw/mingwex/stdio/snprintf.c winsup/mingw/mingwex/stdio/snwprintf.c winsup/mingw/mingwex/stdio/vfscanf.c winsup/mingw/mingwex/stdio/vfwscanf.c winsup/mingw/mingwex/stdio/vscanf.c winsup/mingw/mingwex/stdio/vsnprintf.c winsup/mingw/mingwex/stdio/vsnwprintf.c winsup/mingw/mingwex/stdio/vsscanf.c winsup/mingw/mingwex/stdio/vswscanf.c winsup/mingw/mingwex/stdio/vwscanf.c winsup/mingw/mingwex/strtof.c winsup/mingw/mingwex/strtoimax.c winsup/mingw/mingwex/strtold.c winsup/mingw/mingwex/strtoumax.c winsup/mingw/mingwex/testwmem.c winsup/mingw/mingwex/tst-aligned-malloc.c winsup/mingw/mingwex/ulltoa.c winsup/mingw/mingwex/ulltow.c winsup/mingw/mingwex/wcrtomb.c winsup/mingw/mingwex/wcstof.c winsup/mingw/mingwex/wcstoimax.c winsup/mingw/mingwex/wcstold.c winsup/mingw/mingwex/wcstoumax.c winsup/mingw/mingwex/wctob.c winsup/mingw/mingwex/wctrans.c winsup/mingw/mingwex/wctype.c winsup/mingw/mingwex/wdirent.c winsup/mingw/mingwex/wmemchr.c winsup/mingw/mingwex/wmemcmp.c winsup/mingw/mingwex/wmemcpy.c winsup/mingw/mingwex/wmemmove.c winsup/mingw/mingwex/wmemset.c winsup/mingw/mingwex/wtoll.c winsup/mingw/mkinstalldirs winsup/mingw/moldname.def.in winsup/mingw/msvcrt.def.in winsup/mingw/mthr.c winsup/mingw/mthr_init.c winsup/mingw/mthr_stub.c winsup/mingw/profile/COPYING winsup/mingw/profile/CYGWIN_LICENSE 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/pseudo-reloc-list.c winsup/mingw/pseudo-reloc.c winsup/mingw/readme.txt winsup/mingw/samples/dirent/jamfile winsup/mingw/samples/dirent/test.c winsup/mingw/samples/dirent/wtest.c winsup/mingw/samples/dlltest/dll.c winsup/mingw/samples/dlltest/dll.def winsup/mingw/samples/dlltest/dll.h winsup/mingw/samples/dlltest/exe.c winsup/mingw/samples/dlltest/exe.exp winsup/mingw/samples/dlltest/expexe.c winsup/mingw/samples/dlltest/expexe.def winsup/mingw/samples/dlltest/jamfile winsup/mingw/samples/dlltest/loaddll.c winsup/mingw/samples/dlltest/loadexe.c winsup/mingw/samples/dlltest/readme.txt winsup/mingw/samples/dlltest/silly.cpp winsup/mingw/samples/dlltest/silly.def winsup/mingw/samples/dlltest/silly.exp winsup/mingw/samples/dlltest/silly.h winsup/mingw/samples/dlltest/sillydll.cpp winsup/mingw/samples/filehand/filehand.c winsup/mingw/samples/filehand/jamfile winsup/mingw/samples/filehand/junk.txt winsup/mingw/samples/fixargv/fixargv.c winsup/mingw/samples/fixargv/fixargv.h winsup/mingw/samples/fixargv/readme.txt winsup/mingw/samples/fmode/all.c winsup/mingw/samples/fmode/jamfile winsup/mingw/samples/fmode/readme.txt winsup/mingw/samples/fmode/test.c winsup/mingw/samples/fmode/test2.c winsup/mingw/samples/globbing/glob.c winsup/mingw/samples/globbing/jamfile winsup/mingw/samples/globbing/noglob.c winsup/mingw/samples/globbing/readme.txt winsup/mingw/samples/print/jamfile winsup/mingw/samples/print/prntest.c winsup/mingw/samples/seh/eh3.c winsup/mingw/samples/seh/exutil.c winsup/mingw/samples/seh/exutil.def winsup/mingw/samples/seh/exutil.h winsup/mingw/samples/seh/jamfile winsup/mingw/samples/seh/sehfix.c winsup/mingw/samples/seh/sehsub.c winsup/mingw/samples/seh/sehtest.c winsup/mingw/samples/simpledll/dll.c winsup/mingw/samples/simpledll/dll.cpp winsup/mingw/samples/simpledll/dll.def winsup/mingw/samples/simpledll/exe.c winsup/mingw/samples/simpledll/jamfile winsup/mingw/samples/simpledll/makedll.bat winsup/mingw/samples/test/jamfile winsup/mingw/samples/test/test.c winsup/mingw/samples/wintest/jamfile winsup/mingw/samples/wintest/test.c winsup/mingw/strcasecmp.c winsup/mingw/strncasecmp.c winsup/mingw/test_headers.c winsup/mingw/toascii.c winsup/mingw/txtmode.c winsup/mingw/wcscmpi.c winsup/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/cygrun.c winsup/testsuite/libltp/include/dataascii.h winsup/testsuite/libltp/include/databin.h winsup/testsuite/libltp/include/file_lock.h winsup/testsuite/libltp/include/forker.h winsup/testsuite/libltp/include/open_flags.h winsup/testsuite/libltp/include/pattern.h winsup/testsuite/libltp/include/random_range.h winsup/testsuite/libltp/include/rmobj.h winsup/testsuite/libltp/include/search_path.h winsup/testsuite/libltp/include/str_to_bytes.h winsup/testsuite/libltp/include/string_to_tokens.h winsup/testsuite/libltp/include/test.h winsup/testsuite/libltp/include/tlibio.h winsup/testsuite/libltp/include/usctest.h winsup/testsuite/libltp/include/write_log.h winsup/testsuite/libltp/lib/dataascii.c winsup/testsuite/libltp/lib/databin.c winsup/testsuite/libltp/lib/datapid.c winsup/testsuite/libltp/lib/forker.c winsup/testsuite/libltp/lib/get_high_address.c winsup/testsuite/libltp/lib/libtestsuite.c winsup/testsuite/libltp/lib/open_flags.c winsup/testsuite/libltp/lib/parse_opts.c winsup/testsuite/libltp/lib/pattern.c winsup/testsuite/libltp/lib/rmobj.c winsup/testsuite/libltp/lib/search_path.c winsup/testsuite/libltp/lib/str_to_bytes.c winsup/testsuite/libltp/lib/string_to_tokens.c winsup/testsuite/libltp/lib/tst_res.c winsup/testsuite/libltp/lib/tst_sig.c winsup/testsuite/libltp/lib/tst_tmpdir.c winsup/testsuite/libltp/lib/write_log.c winsup/testsuite/winsup.api/checksignal.c winsup/testsuite/winsup.api/crlf.c winsup/testsuite/winsup.api/devdsp.c winsup/testsuite/winsup.api/devdsp_okay.h winsup/testsuite/winsup.api/devzero.c winsup/testsuite/winsup.api/iospeed.c winsup/testsuite/winsup.api/known_bugs.tcl winsup/testsuite/winsup.api/ltp/access01.c winsup/testsuite/winsup.api/ltp/access03.c winsup/testsuite/winsup.api/ltp/access04.c winsup/testsuite/winsup.api/ltp/access05.c winsup/testsuite/winsup.api/ltp/alarm01.c winsup/testsuite/winsup.api/ltp/alarm02.c winsup/testsuite/winsup.api/ltp/alarm03.c winsup/testsuite/winsup.api/ltp/alarm07.c winsup/testsuite/winsup.api/ltp/asyncio02.c winsup/testsuite/winsup.api/ltp/chdir02.c winsup/testsuite/winsup.api/ltp/chdir04.c winsup/testsuite/winsup.api/ltp/chmod01.c winsup/testsuite/winsup.api/ltp/chmod02.c winsup/testsuite/winsup.api/ltp/chown01.c winsup/testsuite/winsup.api/ltp/close01.c winsup/testsuite/winsup.api/ltp/close02.c winsup/testsuite/winsup.api/ltp/close08.c winsup/testsuite/winsup.api/ltp/creat01.c winsup/testsuite/winsup.api/ltp/creat03.c winsup/testsuite/winsup.api/ltp/creat09.c winsup/testsuite/winsup.api/ltp/dup01.c winsup/testsuite/winsup.api/ltp/dup02.c winsup/testsuite/winsup.api/ltp/dup03.c winsup/testsuite/winsup.api/ltp/dup04.c winsup/testsuite/winsup.api/ltp/dup05.c winsup/testsuite/winsup.api/ltp/execl01.c winsup/testsuite/winsup.api/ltp/execle01.c winsup/testsuite/winsup.api/ltp/execlp01.c winsup/testsuite/winsup.api/ltp/execv01.c winsup/testsuite/winsup.api/ltp/execve01.c winsup/testsuite/winsup.api/ltp/execvp01.c winsup/testsuite/winsup.api/ltp/exit01.c winsup/testsuite/winsup.api/ltp/exit02.c winsup/testsuite/winsup.api/ltp/fchdir01.c winsup/testsuite/winsup.api/ltp/fchdir02.c winsup/testsuite/winsup.api/ltp/fchmod01.c winsup/testsuite/winsup.api/ltp/fchown01.c winsup/testsuite/winsup.api/ltp/fcntl02.c winsup/testsuite/winsup.api/ltp/fcntl03.c winsup/testsuite/winsup.api/ltp/fcntl04.c winsup/testsuite/winsup.api/ltp/fcntl05.c winsup/testsuite/winsup.api/ltp/fcntl07.c winsup/testsuite/winsup.api/ltp/fcntl07B.c winsup/testsuite/winsup.api/ltp/fcntl08.c winsup/testsuite/winsup.api/ltp/fcntl09.c winsup/testsuite/winsup.api/ltp/fcntl10.c winsup/testsuite/winsup.api/ltp/fork01.c winsup/testsuite/winsup.api/ltp/fork02.c winsup/testsuite/winsup.api/ltp/fork03.c winsup/testsuite/winsup.api/ltp/fork04.c winsup/testsuite/winsup.api/ltp/fork06.c winsup/testsuite/winsup.api/ltp/fork07.c winsup/testsuite/winsup.api/ltp/fork09.c winsup/testsuite/winsup.api/ltp/fork10.c winsup/testsuite/winsup.api/ltp/fork11.c winsup/testsuite/winsup.api/ltp/fpathconf01.c winsup/testsuite/winsup.api/ltp/fstat01.c winsup/testsuite/winsup.api/ltp/fstat02.c winsup/testsuite/winsup.api/ltp/fstat03.c winsup/testsuite/winsup.api/ltp/fstat04.c winsup/testsuite/winsup.api/ltp/fsync01.c winsup/testsuite/winsup.api/ltp/ftruncate01.c winsup/testsuite/winsup.api/ltp/ftruncate02.c winsup/testsuite/winsup.api/ltp/ftruncate03.c winsup/testsuite/winsup.api/ltp/getegid01.c winsup/testsuite/winsup.api/ltp/geteuid01.c winsup/testsuite/winsup.api/ltp/getgid01.c winsup/testsuite/winsup.api/ltp/getgid02.c winsup/testsuite/winsup.api/ltp/getgid03.c winsup/testsuite/winsup.api/ltp/getgroups01.c winsup/testsuite/winsup.api/ltp/getgroups02.c winsup/testsuite/winsup.api/ltp/gethostid01.c winsup/testsuite/winsup.api/ltp/gethostname01.c winsup/testsuite/winsup.api/ltp/getpgid01.c winsup/testsuite/winsup.api/ltp/getpgid02.c winsup/testsuite/winsup.api/ltp/getpgrp01.c winsup/testsuite/winsup.api/ltp/getpid01.c winsup/testsuite/winsup.api/ltp/getpid02.c winsup/testsuite/winsup.api/ltp/getppid01.c winsup/testsuite/winsup.api/ltp/getppid02.c winsup/testsuite/winsup.api/ltp/getuid01.c winsup/testsuite/winsup.api/ltp/getuid02.c winsup/testsuite/winsup.api/ltp/getuid03.c winsup/testsuite/winsup.api/ltp/kill01.c winsup/testsuite/winsup.api/ltp/kill02.c winsup/testsuite/winsup.api/ltp/kill03.c winsup/testsuite/winsup.api/ltp/kill04.c winsup/testsuite/winsup.api/ltp/kill09.c winsup/testsuite/winsup.api/ltp/link02.c winsup/testsuite/winsup.api/ltp/link03.c winsup/testsuite/winsup.api/ltp/link04.c winsup/testsuite/winsup.api/ltp/link05.c winsup/testsuite/winsup.api/ltp/lseek01.c winsup/testsuite/winsup.api/ltp/lseek02.c winsup/testsuite/winsup.api/ltp/lseek03.c winsup/testsuite/winsup.api/ltp/lseek04.c winsup/testsuite/winsup.api/ltp/lseek05.c winsup/testsuite/winsup.api/ltp/lseek06.c winsup/testsuite/winsup.api/ltp/lseek07.c winsup/testsuite/winsup.api/ltp/lseek08.c winsup/testsuite/winsup.api/ltp/lseek09.c winsup/testsuite/winsup.api/ltp/lseek10.c winsup/testsuite/winsup.api/ltp/lstat02.c winsup/testsuite/winsup.api/ltp/mkdir01.c winsup/testsuite/winsup.api/ltp/mkdir08.c winsup/testsuite/winsup.api/ltp/mknod01.c winsup/testsuite/winsup.api/ltp/mmap001.c winsup/testsuite/winsup.api/ltp/mmap02.c winsup/testsuite/winsup.api/ltp/mmap03.c winsup/testsuite/winsup.api/ltp/mmap04.c winsup/testsuite/winsup.api/ltp/mmap05.c winsup/testsuite/winsup.api/ltp/mmap06.c winsup/testsuite/winsup.api/ltp/mmap07.c winsup/testsuite/winsup.api/ltp/mmap08.c winsup/testsuite/winsup.api/ltp/munmap01.c winsup/testsuite/winsup.api/ltp/munmap02.c winsup/testsuite/winsup.api/ltp/nice05.c winsup/testsuite/winsup.api/ltp/open02.c winsup/testsuite/winsup.api/ltp/open03.c winsup/testsuite/winsup.api/ltp/pathconf01.c winsup/testsuite/winsup.api/ltp/pause01.c winsup/testsuite/winsup.api/ltp/pipe01.c winsup/testsuite/winsup.api/ltp/pipe08.c winsup/testsuite/winsup.api/ltp/pipe09.c winsup/testsuite/winsup.api/ltp/pipe10.c winsup/testsuite/winsup.api/ltp/pipe11.c winsup/testsuite/winsup.api/ltp/poll01.c winsup/testsuite/winsup.api/ltp/read01.c winsup/testsuite/winsup.api/ltp/read04.c winsup/testsuite/winsup.api/ltp/readdir01.c winsup/testsuite/winsup.api/ltp/readlink01.c winsup/testsuite/winsup.api/ltp/readlink02.c winsup/testsuite/winsup.api/ltp/readlink03.c winsup/testsuite/winsup.api/ltp/rename01.c winsup/testsuite/winsup.api/ltp/rename02.c winsup/testsuite/winsup.api/ltp/rename08.c winsup/testsuite/winsup.api/ltp/rename10.c winsup/testsuite/winsup.api/ltp/rmdir01.c winsup/testsuite/winsup.api/ltp/rmdir04.c winsup/testsuite/winsup.api/ltp/rmdir05.c winsup/testsuite/winsup.api/ltp/sbrk01.c winsup/testsuite/winsup.api/ltp/select01.c winsup/testsuite/winsup.api/ltp/select02.c winsup/testsuite/winsup.api/ltp/select03.c winsup/testsuite/winsup.api/ltp/setgid01.c winsup/testsuite/winsup.api/ltp/setgroups01.c winsup/testsuite/winsup.api/ltp/setpgid01.c winsup/testsuite/winsup.api/ltp/setregid01.c winsup/testsuite/winsup.api/ltp/setreuid01.c winsup/testsuite/winsup.api/ltp/setuid01.c winsup/testsuite/winsup.api/ltp/setuid02.c winsup/testsuite/winsup.api/ltp/signal03.c winsup/testsuite/winsup.api/ltp/stat01.c winsup/testsuite/winsup.api/ltp/stat02.c winsup/testsuite/winsup.api/ltp/stat03.c winsup/testsuite/winsup.api/ltp/stat05.c winsup/testsuite/winsup.api/ltp/stat06.c winsup/testsuite/winsup.api/ltp/symlink01.c winsup/testsuite/winsup.api/ltp/symlink02.c winsup/testsuite/winsup.api/ltp/symlink03.c winsup/testsuite/winsup.api/ltp/symlink04.c winsup/testsuite/winsup.api/ltp/symlink05.c winsup/testsuite/winsup.api/ltp/sync01.c winsup/testsuite/winsup.api/ltp/sync02.c winsup/testsuite/winsup.api/ltp/time01.c winsup/testsuite/winsup.api/ltp/time02.c winsup/testsuite/winsup.api/ltp/times01.c winsup/testsuite/winsup.api/ltp/times02.c winsup/testsuite/winsup.api/ltp/times03.c winsup/testsuite/winsup.api/ltp/truncate01.c winsup/testsuite/winsup.api/ltp/truncate02.c winsup/testsuite/winsup.api/ltp/ulimit01.c winsup/testsuite/winsup.api/ltp/umask01.c winsup/testsuite/winsup.api/ltp/umask02.c winsup/testsuite/winsup.api/ltp/umask03.c winsup/testsuite/winsup.api/ltp/uname01.c winsup/testsuite/winsup.api/ltp/unlink05.c winsup/testsuite/winsup.api/ltp/unlink06.c winsup/testsuite/winsup.api/ltp/unlink07.c winsup/testsuite/winsup.api/ltp/unlink08.c winsup/testsuite/winsup.api/ltp/vfork01.c winsup/testsuite/winsup.api/ltp/wait02.c winsup/testsuite/winsup.api/ltp/wait401.c winsup/testsuite/winsup.api/ltp/wait402.c winsup/testsuite/winsup.api/ltp/write01.c winsup/testsuite/winsup.api/ltp/write02.c winsup/testsuite/winsup.api/ltp/write03.c winsup/testsuite/winsup.api/mmaptest01.c winsup/testsuite/winsup.api/mmaptest02.c winsup/testsuite/winsup.api/mmaptest03.c winsup/testsuite/winsup.api/mmaptest04.c winsup/testsuite/winsup.api/msgtest.c winsup/testsuite/winsup.api/nullgetcwd.c winsup/testsuite/winsup.api/pthread/cancel1.c winsup/testsuite/winsup.api/pthread/cancel10.c winsup/testsuite/winsup.api/pthread/cancel11.c winsup/testsuite/winsup.api/pthread/cancel12.c winsup/testsuite/winsup.api/pthread/cancel2.c winsup/testsuite/winsup.api/pthread/cancel3.c winsup/testsuite/winsup.api/pthread/cancel4.c winsup/testsuite/winsup.api/pthread/cancel5.c winsup/testsuite/winsup.api/pthread/cancel6.c winsup/testsuite/winsup.api/pthread/cancel7.c winsup/testsuite/winsup.api/pthread/cancel8.c winsup/testsuite/winsup.api/pthread/cancel9.c winsup/testsuite/winsup.api/pthread/cleanup2.c winsup/testsuite/winsup.api/pthread/cleanup3.c winsup/testsuite/winsup.api/pthread/condvar1.c winsup/testsuite/winsup.api/pthread/condvar2.c winsup/testsuite/winsup.api/pthread/condvar2_1.c winsup/testsuite/winsup.api/pthread/condvar3.c winsup/testsuite/winsup.api/pthread/condvar3_1.c winsup/testsuite/winsup.api/pthread/condvar3_2.c winsup/testsuite/winsup.api/pthread/condvar3_3.c winsup/testsuite/winsup.api/pthread/condvar4.c winsup/testsuite/winsup.api/pthread/condvar5.c winsup/testsuite/winsup.api/pthread/condvar6.c winsup/testsuite/winsup.api/pthread/condvar7.c winsup/testsuite/winsup.api/pthread/condvar8.c winsup/testsuite/winsup.api/pthread/condvar9.c winsup/testsuite/winsup.api/pthread/count1.c winsup/testsuite/winsup.api/pthread/create1.c winsup/testsuite/winsup.api/pthread/create2.c winsup/testsuite/winsup.api/pthread/equal1.c winsup/testsuite/winsup.api/pthread/exit1.c winsup/testsuite/winsup.api/pthread/exit2.c winsup/testsuite/winsup.api/pthread/exit3.c winsup/testsuite/winsup.api/pthread/inherit1.c winsup/testsuite/winsup.api/pthread/join0.c winsup/testsuite/winsup.api/pthread/join1.c winsup/testsuite/winsup.api/pthread/join2.c winsup/testsuite/winsup.api/pthread/mainthreadexits.c winsup/testsuite/winsup.api/pthread/mutex1.c winsup/testsuite/winsup.api/pthread/mutex1d.c winsup/testsuite/winsup.api/pthread/mutex1e.c winsup/testsuite/winsup.api/pthread/mutex1n.c winsup/testsuite/winsup.api/pthread/mutex1r.c winsup/testsuite/winsup.api/pthread/mutex2.c winsup/testsuite/winsup.api/pthread/mutex3.c winsup/testsuite/winsup.api/pthread/mutex4.c winsup/testsuite/winsup.api/pthread/mutex5.c winsup/testsuite/winsup.api/pthread/mutex6d.c winsup/testsuite/winsup.api/pthread/mutex6e.c winsup/testsuite/winsup.api/pthread/mutex6n.c winsup/testsuite/winsup.api/pthread/mutex6r.c winsup/testsuite/winsup.api/pthread/mutex7.c winsup/testsuite/winsup.api/pthread/mutex7d.c winsup/testsuite/winsup.api/pthread/mutex7e.c winsup/testsuite/winsup.api/pthread/mutex7n.c winsup/testsuite/winsup.api/pthread/mutex7r.c winsup/testsuite/winsup.api/pthread/mutex8e.c winsup/testsuite/winsup.api/pthread/mutex8n.c winsup/testsuite/winsup.api/pthread/mutex8r.c winsup/testsuite/winsup.api/pthread/once1.c winsup/testsuite/winsup.api/pthread/priority1.c winsup/testsuite/winsup.api/pthread/priority2.c winsup/testsuite/winsup.api/pthread/rwlock1.c winsup/testsuite/winsup.api/pthread/rwlock2.c winsup/testsuite/winsup.api/pthread/rwlock3.c winsup/testsuite/winsup.api/pthread/rwlock4.c winsup/testsuite/winsup.api/pthread/rwlock5.c winsup/testsuite/winsup.api/pthread/rwlock6.c winsup/testsuite/winsup.api/pthread/rwlock7.c winsup/testsuite/winsup.api/pthread/self1.c winsup/testsuite/winsup.api/pthread/self2.c winsup/testsuite/winsup.api/pthread/test.h winsup/testsuite/winsup.api/pthread/threadidafterfork.c winsup/testsuite/winsup.api/pthread/tsd1.c winsup/testsuite/winsup.api/samples/sample-fail.c winsup/testsuite/winsup.api/samples/sample-miscompile.c winsup/testsuite/winsup.api/samples/sample-pass.c winsup/testsuite/winsup.api/semtest.c winsup/testsuite/winsup.api/shmtest.c winsup/testsuite/winsup.api/sigchld.c winsup/testsuite/winsup.api/signal-into-win32-api.c winsup/testsuite/winsup.api/systemcall.c winsup/testsuite/winsup.api/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/ipcrm.c winsup/utils/ipcs.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.w32api winsup/w32api/TODO winsup/w32api/config.guess winsup/w32api/config.sub winsup/w32api/configure winsup/w32api/configure.in winsup/w32api/include/GL/gl.h winsup/w32api/include/GL/glext.h winsup/w32api/include/GL/glu.h winsup/w32api/include/accctrl.h winsup/w32api/include/aclapi.h winsup/w32api/include/aclui.h winsup/w32api/include/afxres.h winsup/w32api/include/basetsd.h winsup/w32api/include/basetyps.h winsup/w32api/include/cderr.h winsup/w32api/include/cguid.h winsup/w32api/include/comcat.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/ddk/atm.h winsup/w32api/include/ddk/batclass.h winsup/w32api/include/ddk/cfg.h winsup/w32api/include/ddk/cfgmgr32.h winsup/w32api/include/ddk/d4drvif.h winsup/w32api/include/ddk/d4iface.h winsup/w32api/include/ddk/ddkmapi.h winsup/w32api/include/ddk/hidclass.h winsup/w32api/include/ddk/hidpi.h winsup/w32api/include/ddk/hidusage.h winsup/w32api/include/ddk/kbdmou.h winsup/w32api/include/ddk/mcd.h winsup/w32api/include/ddk/miniport.h winsup/w32api/include/ddk/minitape.h winsup/w32api/include/ddk/mountdev.h winsup/w32api/include/ddk/mountmgr.h winsup/w32api/include/ddk/ndis.h winsup/w32api/include/ddk/ndisguid.h winsup/w32api/include/ddk/ndistapi.h winsup/w32api/include/ddk/ndiswan.h winsup/w32api/include/ddk/netevent.h winsup/w32api/include/ddk/netpnp.h winsup/w32api/include/ddk/newdev.h winsup/w32api/include/ddk/ntapi.h winsup/w32api/include/ddk/ntdd8042.h winsup/w32api/include/ddk/ntddbeep.h winsup/w32api/include/ddk/ntddcdrm.h winsup/w32api/include/ddk/ntddcdvd.h winsup/w32api/include/ddk/ntddchgr.h winsup/w32api/include/ddk/ntdddisk.h winsup/w32api/include/ddk/ntddk.h winsup/w32api/include/ddk/ntddkbd.h winsup/w32api/include/ddk/ntddmou.h winsup/w32api/include/ddk/ntddndis.h winsup/w32api/include/ddk/ntddpar.h winsup/w32api/include/ddk/ntddpcm.h winsup/w32api/include/ddk/ntddscsi.h winsup/w32api/include/ddk/ntddser.h winsup/w32api/include/ddk/ntddstor.h winsup/w32api/include/ddk/ntddtape.h winsup/w32api/include/ddk/ntddtdi.h winsup/w32api/include/ddk/ntddvdeo.h winsup/w32api/include/ddk/ntddvol.h winsup/w32api/include/ddk/ntifs.h winsup/w32api/include/ddk/ntpoapi.h winsup/w32api/include/ddk/ntstatus.h winsup/w32api/include/ddk/parallel.h winsup/w32api/include/ddk/pfhook.h winsup/w32api/include/ddk/poclass.h winsup/w32api/include/ddk/scsi.h winsup/w32api/include/ddk/scsiscan.h winsup/w32api/include/ddk/scsiwmi.h winsup/w32api/include/ddk/smbus.h winsup/w32api/include/ddk/srb.h winsup/w32api/include/ddk/storport.h winsup/w32api/include/ddk/tdi.h winsup/w32api/include/ddk/tdiinfo.h winsup/w32api/include/ddk/tdikrnl.h winsup/w32api/include/ddk/tdistat.h winsup/w32api/include/ddk/tvout.h winsup/w32api/include/ddk/upssvc.h winsup/w32api/include/ddk/usb.h winsup/w32api/include/ddk/usb100.h winsup/w32api/include/ddk/usbcamdi.h winsup/w32api/include/ddk/usbdi.h winsup/w32api/include/ddk/usbioctl.h winsup/w32api/include/ddk/usbiodef.h winsup/w32api/include/ddk/usbscan.h winsup/w32api/include/ddk/usbuser.h winsup/w32api/include/ddk/video.h winsup/w32api/include/ddk/videoagp.h winsup/w32api/include/ddk/win2k.h winsup/w32api/include/ddk/winddi.h winsup/w32api/include/ddk/winddk.h winsup/w32api/include/ddk/winnt4.h winsup/w32api/include/ddk/winxp.h winsup/w32api/include/ddk/ws2san.h winsup/w32api/include/ddk/xfilter.h winsup/w32api/include/dhcpcsdk.h winsup/w32api/include/directx/d3d9.h winsup/w32api/include/directx/d3d9caps.h winsup/w32api/include/directx/d3d9types.h winsup/w32api/include/directx/dxerr8.h winsup/w32api/include/directx/dxerr9.h winsup/w32api/include/dlgs.h winsup/w32api/include/docobj.h winsup/w32api/include/errorrep.h winsup/w32api/include/exdisp.h winsup/w32api/include/exdispid.h winsup/w32api/include/httpext.h winsup/w32api/include/idispids.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/mgmtapi.h winsup/w32api/include/mmsystem.h winsup/w32api/include/msacm.h winsup/w32api/include/mshtml.h winsup/w32api/include/mswsock.h winsup/w32api/include/nb30.h winsup/w32api/include/nddeapi.h winsup/w32api/include/nspapi.h winsup/w32api/include/ntdef.h winsup/w32api/include/ntdll.h winsup/w32api/include/ntldap.h winsup/w32api/include/ntsecapi.h winsup/w32api/include/ntsecpkg.h winsup/w32api/include/oaidl.h winsup/w32api/include/objbase.h winsup/w32api/include/objfwd.h winsup/w32api/include/objidl.h winsup/w32api/include/ocidl.h winsup/w32api/include/odbcinst.h winsup/w32api/include/ole.h winsup/w32api/include/ole2.h winsup/w32api/include/ole2ver.h winsup/w32api/include/oleacc.h winsup/w32api/include/oleauto.h winsup/w32api/include/olectl.h winsup/w32api/include/olectlid.h winsup/w32api/include/oledlg.h winsup/w32api/include/oleidl.h winsup/w32api/include/pbt.h winsup/w32api/include/poppack.h winsup/w32api/include/powrprof.h winsup/w32api/include/prsht.h winsup/w32api/include/psapi.h winsup/w32api/include/pshpack1.h winsup/w32api/include/pshpack2.h winsup/w32api/include/pshpack4.h winsup/w32api/include/pshpack8.h winsup/w32api/include/rapi.h winsup/w32api/include/ras.h winsup/w32api/include/rasdlg.h winsup/w32api/include/raserror.h winsup/w32api/include/rassapi.h winsup/w32api/include/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/secext.h winsup/w32api/include/security.h winsup/w32api/include/servprov.h winsup/w32api/include/setupapi.h winsup/w32api/include/shellapi.h winsup/w32api/include/shldisp.h winsup/w32api/include/shlguid.h winsup/w32api/include/shlobj.h winsup/w32api/include/shlwapi.h winsup/w32api/include/snmp.h winsup/w32api/include/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/svcguid.h winsup/w32api/include/tlhelp32.h winsup/w32api/include/tmschema.h winsup/w32api/include/unknwn.h winsup/w32api/include/userenv.h winsup/w32api/include/uxtheme.h winsup/w32api/include/vfw.h winsup/w32api/include/w32api.h winsup/w32api/include/winable.h winsup/w32api/include/winbase.h winsup/w32api/include/winber.h winsup/w32api/include/wincon.h winsup/w32api/include/wincrypt.h winsup/w32api/include/windef.h winsup/w32api/include/windns.h winsup/w32api/include/windows.h winsup/w32api/include/windowsx.h winsup/w32api/include/winerror.h winsup/w32api/include/wingdi.h winsup/w32api/include/wininet.h winsup/w32api/include/winioctl.h winsup/w32api/include/winldap.h winsup/w32api/include/winnetwk.h winsup/w32api/include/winnls.h winsup/w32api/include/winnt.h winsup/w32api/include/winperf.h winsup/w32api/include/winreg.h winsup/w32api/include/winresrc.h winsup/w32api/include/winsnmp.h winsup/w32api/include/winsock.h winsup/w32api/include/winsock2.h winsup/w32api/include/winspool.h winsup/w32api/include/winsvc.h winsup/w32api/include/winuser.h winsup/w32api/include/winver.h winsup/w32api/include/ws2spi.h winsup/w32api/include/ws2tcpip.h winsup/w32api/include/wsahelp.h winsup/w32api/include/wsipx.h winsup/w32api/include/wsnetbs.h winsup/w32api/include/wtypes.h winsup/w32api/include/zmouse.h winsup/w32api/install-sh winsup/w32api/lib/Makefile.in winsup/w32api/lib/aclui.def winsup/w32api/lib/advapi32.def winsup/w32api/lib/avicap32.def winsup/w32api/lib/avifil32.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/ddk/Makefile.in winsup/w32api/lib/ddk/apcups.def winsup/w32api/lib/ddk/cfgmgr32.def winsup/w32api/lib/ddk/dxapi.def winsup/w32api/lib/ddk/hal.def winsup/w32api/lib/ddk/hid.def winsup/w32api/lib/ddk/hidparse.def winsup/w32api/lib/ddk/mcd.def winsup/w32api/lib/ddk/ndis.def winsup/w32api/lib/ddk/ntoskrnl.def winsup/w32api/lib/ddk/scsiport.def winsup/w32api/lib/ddk/tdi.def winsup/w32api/lib/ddk/usbcamd.def winsup/w32api/lib/ddk/usbcamd2.def winsup/w32api/lib/ddk/videoprt.def winsup/w32api/lib/ddk/win32k.def winsup/w32api/lib/dhcpcsvc.def winsup/w32api/lib/directx/Makefile.in winsup/w32api/lib/directx/d3d8.def winsup/w32api/lib/directx/d3d9.def winsup/w32api/lib/directx/d3dim.def winsup/w32api/lib/directx/d3drm.def winsup/w32api/lib/directx/d3dx8d.def winsup/w32api/lib/directx/d3dx9d.def winsup/w32api/lib/directx/d3dxof.def winsup/w32api/lib/directx/ddraw.def winsup/w32api/lib/directx/dinput.def winsup/w32api/lib/directx/dinput8.def winsup/w32api/lib/directx/dinput_joy.c winsup/w32api/lib/directx/dinput_joy2.c winsup/w32api/lib/directx/dinput_kbd.c winsup/w32api/lib/directx/dinput_mouse.c winsup/w32api/lib/directx/dinput_mouse2.c winsup/w32api/lib/directx/dinput_private.h winsup/w32api/lib/directx/dmoguids.c winsup/w32api/lib/directx/dplayx.def winsup/w32api/lib/directx/dpnaddr.def winsup/w32api/lib/directx/dpnet.def winsup/w32api/lib/directx/dpnlobby.def winsup/w32api/lib/directx/dpvoice.def winsup/w32api/lib/directx/dsetup.def winsup/w32api/lib/directx/dsound.def winsup/w32api/lib/directx/dxerr.c winsup/w32api/lib/directx/dxerr8.c winsup/w32api/lib/directx/dxerr8w.c winsup/w32api/lib/directx/dxerr9.c winsup/w32api/lib/directx/dxerr9w.c winsup/w32api/lib/directx/dxguid.c winsup/w32api/lib/directx/ksproxy.def winsup/w32api/lib/directx/ksuser.c winsup/w32api/lib/directx/ksuser.def winsup/w32api/lib/directx/msdmo.def winsup/w32api/lib/directx/quartz.def winsup/w32api/lib/directx/strmiids.c winsup/w32api/lib/directx/test.c winsup/w32api/lib/dlcapi.def winsup/w32api/lib/dnsapi.def winsup/w32api/lib/faultrep.def 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/igmpagnt.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/mshtml-uuid.c winsup/w32api/lib/msimg32.def winsup/w32api/lib/msvcp60.def winsup/w32api/lib/msvfw32.def winsup/w32api/lib/mswsock.def winsup/w32api/lib/nddeapi.def winsup/w32api/lib/netapi32.def winsup/w32api/lib/ntdll.def winsup/w32api/lib/odbc32.def winsup/w32api/lib/odbccp32.def winsup/w32api/lib/ole32.def winsup/w32api/lib/oleacc.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/powrprof.def winsup/w32api/lib/psapi.def winsup/w32api/lib/rapi.def winsup/w32api/lib/rasapi32.def winsup/w32api/lib/rasdlg.def winsup/w32api/lib/res.rc winsup/w32api/lib/rpcdce4.def winsup/w32api/lib/rpcns4.def winsup/w32api/lib/rpcrt4.def winsup/w32api/lib/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/shfolder.def winsup/w32api/lib/shlwapi.def winsup/w32api/lib/snmpapi.def winsup/w32api/lib/svrapi.def winsup/w32api/lib/tapi32.def winsup/w32api/lib/test.c winsup/w32api/lib/th32.def winsup/w32api/lib/thunk32.def winsup/w32api/lib/url.def winsup/w32api/lib/user32.def winsup/w32api/lib/userenv.def winsup/w32api/lib/uuid.c winsup/w32api/lib/uxtheme.def winsup/w32api/lib/vdmdbg.def winsup/w32api/lib/version.def winsup/w32api/lib/vfw32.mri winsup/w32api/lib/win32spl.def winsup/w32api/lib/wininet.def winsup/w32api/lib/winmm.def winsup/w32api/lib/winspool.def winsup/w32api/lib/winstrm.def winsup/w32api/lib/wldap32.def winsup/w32api/lib/wow32.def winsup/w32api/lib/ws2_32.def winsup/w32api/lib/wsnmp32.def winsup/w32api/lib/wsock32.def winsup/w32api/lib/wst.def
Diffstat (limited to 'winsup/cygserver')
-rw-r--r--winsup/cygserver/ChangeLog400
-rw-r--r--winsup/cygserver/Makefile.in91
-rw-r--r--winsup/cygserver/README210
-rw-r--r--winsup/cygserver/bsd_helper.cc697
-rw-r--r--winsup/cygserver/bsd_helper.h63
-rw-r--r--winsup/cygserver/bsd_log.cc95
-rw-r--r--winsup/cygserver/bsd_log.h33
-rw-r--r--winsup/cygserver/bsd_mutex.cc387
-rw-r--r--winsup/cygserver/bsd_mutex.h52
-rw-r--r--winsup/cygserver/client.cc543
-rwxr-xr-xwinsup/cygserver/configure2163
-rw-r--r--winsup/cygserver/configure.in123
-rwxr-xr-xwinsup/cygserver/cygserver-config209
-rw-r--r--winsup/cygserver/cygserver.cc765
-rw-r--r--winsup/cygserver/cygserver.conf136
-rw-r--r--winsup/cygserver/msg.cc117
-rw-r--r--winsup/cygserver/process.cc442
-rw-r--r--winsup/cygserver/process.h178
-rw-r--r--winsup/cygserver/sem.cc107
-rw-r--r--winsup/cygserver/shm.cc124
-rw-r--r--winsup/cygserver/sysv_msg.cc1210
-rw-r--r--winsup/cygserver/sysv_sem.cc1385
-rw-r--r--winsup/cygserver/sysv_shm.cc1043
-rw-r--r--winsup/cygserver/threaded_queue.cc410
-rw-r--r--winsup/cygserver/threaded_queue.h127
-rw-r--r--winsup/cygserver/transport.cc53
-rw-r--r--winsup/cygserver/transport.h39
-rw-r--r--winsup/cygserver/transport_pipes.cc355
-rw-r--r--winsup/cygserver/transport_pipes.h47
-rw-r--r--winsup/cygserver/transport_sockets.cc395
-rw-r--r--winsup/cygserver/transport_sockets.h46
-rw-r--r--winsup/cygserver/woutsup.h73
32 files changed, 0 insertions, 12118 deletions
diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog
deleted file mode 100644
index c832296..0000000
--- a/winsup/cygserver/ChangeLog
+++ /dev/null
@@ -1,400 +0,0 @@
-2005-04-08 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (msleep_cnt): Remove.
- (msleep_max_cnt): Remove.
- (msleep_arr): Remove.
- (class msleep_sync_array): New class to encapsulate msleep/wakeup
- thread synchronization.
- (msleep_sync): New object pointer.
- (msleep_init): Initialize new msleep_sync object.
- (_mutex): Just call msleep_sync->enter() and msleep_sync->leave() for
- thread synchronization. Improve debug output a bit more.
- (wakeup): Just call msleep_sync->wakeup().
- (wakeup_all): Whitespace fix.
-
-2005-04-06 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_helper.cc (ipcexit_hookthread): Fix whitespace and handle leak.
- * bsd_mutex.cc: Include stdlib.h, sys/msg.h and sys/sem.h.
- (mtx_init): Initialize lock counter to 0.
- (_mtx_lock): Increment and log mutex lock counter.
- (mtx_owned): Add winpid argument. Return true only if mutex is
- actually owned by process winpid.
- (_mtx_assert): Add winpid argument accordingly.
- (_mtx_unlock): Log owner and lock count.
- (MSLEEP_MUTEX): Remove.
- (MSLEEP_SEM): Ditto.
- (MSLEEP_EVENT): Ditto.
- (msleep_event_name): Ditto.
- (msleep_cs): New global critical section.
- (msleep_cnt): New global variable indicating msleep record usage.
- (msleep_max_cnt): New global variable indicating msleep record size.
- (msleep_arr): New global pointer to msleep records.
- (msleep_init): Initialize msleep_cs. Allocate msleep_arr array.
- (_msleep): Rewrite using new msleep_cs/msleep_arr based thread
- synchronization. Don't be shy with debug output.
- (wakeup): Rewrite using new msleep_cs/msleep_arr based thread
- synchronization.
- * bsd_mutex.h (struct mtx): Add lock counter for better debugging.
- (mtx_owned): Declare with winpid argument.
- (_mtx_assert): Ditto.
- (mtx_assert): Define with winpid argument.
- * cygserver.cc (version): Remove.
- (SERVER_VERSION): New define, decoupling server version information
- from source code control system.
- (print_version): Simplify printing server version.
- * process.cc (process::process): Fix wrong bracketing (and handle leak).
- (process::~process): Only try to close _signal_arrived if valid.
- * sysv_sem.cc: Include sys/smallprint.h.
- (semundo_clear): Define with additional struct thread pointer argument.
- Accomodate throughout.
- (SEMUNDO_LOCKASSERT): Define with winpid argument. Accomodate
- throughout.
- (struct sem_undo): Define un_proc as pid_t on Cygwin. Accomodate
- throughout.
- (seminit): Improve debugging by adding the semid to the mutex name.
- (semget): Correctly print key value as 64 bit hex value in debug
- output.
- (semexit_myhook): Remove Cygwin specific unlocking of mutexes owned
- by exiting process. Keep semaphore global lock throughout whole
- function to avoid races.
- * sysv_shm.cc (GIANT_REQUIRED): Define empty on Cygwin. We know that
- Giant is locked.
-
-2005-04-01 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (_msleep): Whitespace fix.
- * process.cc (process::process): Handle invalid signal_arrived values
- more gracefully.
-
-2004-12-30 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc: Include limits.h.
- (MSLEEP_MUTEX): New define for third parameter to msleep_event_name.
- (MSLEEP_SEM): Ditto.
- (MSLEEP_EVENT): Ditto.
- (msleep_event_name): Add third parameter to allow multiple
- synchronization objects per ident.
- (_msleep): Implement new synchronization technique to make sure
- that all threads have been woken up by a corresponding wakeup call.
- (wakeup): Ditto.
-
-2004-10-18 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_sem.cc: Redefine offsetof to circumvent build problems with
- gcc 3.4.
-
-2004-10-04 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (_msleep): Simplify event creation. Revert change from
- 2004-08-24. It should be unnecessary now.
- * msg.cc (client_request_msg::serve): Release process critical
- section as early as possible.
- * sem.cc (client_request_sem::serve): Ditto.
- * shm.cc (client_request_shm::serve): Ditto.
- * process.cc: Use hold and release method calls instead of
- EnterCriticalSection/LeaveCriticalSection calls throughout.
- * process.h (_hold): Rename from hold. Take filename and linenumber
- parameter for logging. Define matching hold macro.
- (release): Ditto.
-
-2004-10-01 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_sem.cc: Update to FreeBSD version 1.69.
- 1.68: Reduce the overhead of semop() by using the kernel stack
- instead of malloc'd memory to store the operations array if it
- is small enough to fit.
- 1.69: Adjust the number of processes waiting on a semaphore properly
- if we're woken up in the middle of sleeping.
-
-2004-09-23 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_shm.cc (kern_shmat): Avoid compiler warning.
-
-2004-09-21 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_shm.cc (vm_object_reference): remove Cygwin specific define.
- (vm_map_find): Ditto.
- (vm_map_inherit): Ditto.
- (kern_shmat): On Cygwin, take shmaddr just as is. Don't call vm
- system calls on Cygwin. Add comment.
-
-2004-09-15 Corinna Vinschen <corinna@vinschen.de>
-
- Fix copyright throughout.
- Eliminate use of _impure_ptr outside Cygwin.
- * bsd_helper.cc: Include errno.h instead of cygerrno.h.
- * bsd_mutex.cc : Ditto.
- * client.cc: Ditto.
- * cygserver.cc: Ditto.
- * process.cc: Don't build functions inside Cygwin. Don't include
- cygerrno.h. Don't set errno.
- * transport_pipes.cc (SET_ERRNO): New define. Use througout.
- * transport_sockets.cc (SET_ERRNO): Ditto.
- (GET_ERRNO): Ditto.
-
-2004-09-06 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (_msleep): Disable resetting event object for now.
-
-2004-08-31 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_shm.cc (kern_shmat): Add debug_printf's.
-
-2004-08-24 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (_msleep): Release process object while waiting.
-
-2004-08-03 Corinna Vinschen <corinna@vinschen.de>
-
- * transport.cc (transport_layer_base::~transport_layer_base): Resurrect.
- * transport.h (transport_layer_base::~transport_layer_base): Ditto.
-
-2004-07-30 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (_msleep): Reset event object and close it before
- entering mutex. Turn order of conditional for better readability.
-
-2004-07-26 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.conf: Describe relation between shmmaxpgs and SHMMAX.
-
-2004-07-20 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_helper.cc: Whitespace fixes.
- * bsd_mutex.cc: Ditto.
-
-2004-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * transport.cc (transport_layer_base::~transport_layer_base): Remove.
- * transport.h (transport_layer_base::~transport_layer_base): Ditto.
-
-2004-07-19 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (win_priority): Actually calculate p from priority.
-
-2004-06-03 Corinna Vinschen <corinna@vinschen.de>
-
- * shm.cc (shmget): Explicitely set td_retval[0] to -1 on error.
-
-2004-03-30 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_shm.cc (shmget): Allow to retrieve shared memory segments
- by shmid when IPC_KEY_IS_SHMID is set.
-
-2004-03-02 Corinna Vinschen <corinna@vinschen.de>
-
- * sysv_sem.cc (semundo_adjust): Check for process id instead of
- process struct pointer, which isn't fixed under Cygwin.
- (semexit_myhook): Ditto. Adjust debug print statements to print
- Cygwin and Windows PIDs instead of process pointer under Cygwin.
-
-2004-02-07 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (win_priority): Move to msleep helper function section.
- (set_priority): Ditto. Fix formatting.
- (_msleep): Cleanup obj formatting. Rearrange obj order.
-
-2004-02-06 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_mutex.cc (_msleep): Handle PCATCH using signal_arrived event.
- * client.cc: Include sigproc.h.
- * msg.cc (client_request_msg::serve): Accomodate third parameter to
- process::process.
- * sem.cc (client_request_sem::serve): Ditto.
- * shm.cc (client_request_shm::serve): Ditto.
- * process.cc (process::process): Duplicate signal_arrived into
- Cygserver process space.
- (process::~process): Close _signal_arrived handle.
- (process_cache::process): Add signal_arrived handling.
- * process.h (process::process): Add signal_arrived parameter.
- (process:signal_arrived): New read accessor.
- (process:_signal_arrived): New member.
- (process_cache::process): Add signal_arrived parameter.
-
-2004-01-16 Corinna Vinschen <corinna@vinschen.de>
-
- * process.h (cleanup_routine::~cleanup_routine): Make pure virtual
- function to avoid miscompilation with certain versions of gcc.
- * process.cc (cleanup_routine::~cleanup_routine): Remove.
-
-2003-12-26 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (CFLAGS, CXXFLAGS): Remove unneeded include.
- (CYGWIN_LIB): Delete.
- (cygserver.exe target): Add -L$(cygwin_build) to the link line to force
- linker to use build tree version of the library. Remove specific
- inclusion of libcygwin.a from the link line.
-
-2003-12-16 Corinna Vinschen <corinna@vinschen.de>
-
- * bsd_helper.cc (tunable_params): Add entries for kern.ipc.msgmnb and
- kern.ipc.msgtql. Raise max value for kern.ipc.msgseg to 65535.
- * cygserver.conf: Add kern.ipc.msgmnb and kern.ipc.msgtql.
- * sysv_msg.cc (msginit): Add TUNABLE_INT_FETCH call for
- kern.ipc.msgmnb and kern.ipc.msgtql.
-
-2003-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.cc (main): Move call to ipcinit() up before installing
- any threads.
- * sysv_sem.cc: Update to FreeBSD version 1.67.
- (seminit): Initialize semaphore sequence numbers to 0.
-
-2003-11-26 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (CYGWIN_LIB): Variable pointing to libcygwin.a in
- the parallel cygwin dir.
- (cygserver.exe): Depend on and link against $CYGWIN_LIB.
-
-2003-11-25 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (CXXFLAGS): Remove duplicate options handled in
- Makefile.common.
-
-2003-11-22 Corinna Vinschen <corinna@vinschen.de>
-
- * msg.cc (client_request_msg::serve): Add default case to msgop switch.
- * sem.cc (client_request_sem::serve): Add default case to semop switch.
- * shm.cc (client_request_shm::serve): Add default case to shmop switch.
-
-2003-11-21 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (install): Explicitely create directories. Install
- README to $(prefix)/share/doc/Cygwin.
- * README: New file.
-
-2003-11-21 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver.cc (print_usage): Fix scrambled output.
-
-2003-11-20 Corinna Vinschen <corinna@vinschen.de>
-
- * cygserver-config: Slightly modify printed message.
-
-2003-11-20 Corinna Vinschen <corinna@vinschen.de>
-
- * Makefile.in (install): Install cygserver-config script to bindir.
- * cygserver-config: New script.
-
-2003-11-19 Corinna Vinschen <corinna@vinschen.de>
-
- Don't use safe_new but new throughout. Fix copyright dates
- throughout.
- * Makefile.in: Accomodate all new files and name changes.
- Add a *.d dependency.
- (sbindir): Add.
- (etcdir): Drop in favor of more appropriate sysconfdir definition.
- (sysconfdir): Add.
- (CXXFLAGS): Add -MMD flag. Add SYSCONFDIR definition.
- (.SUFFIXES): Add.
- (install): Add action items.
- (libclean): New target.
- (fullclean): Ditto.
- * bsd_helper.cc: New file.
- * bsd_helper.h: Ditto.
- * bsd_log.cc: Ditto.
- * bsd_log.h: Ditto.
- * bsd_mutex.cc: Ditto.
- * bsd_mutex.h: Ditto.
- * client.cc: Rearrange to build as less as possible if
- __INSIDE_CYGWIN__.
- (client_request::handle_request): Add Message Queue and Semaphore
- handling.
- * cygserver.cc: Rearrange to build as less as possible if
- __INSIDE_CYGWIN__. Use new debug/log/panic logging functions.
- (DEF_CONFIG_FILE): New definition for configuration file. Use
- throughout.
- (getfunc): Remove.
- (__cygserver__printf): Remove.
- (client_request_attach_tty::serve): Return error if impersonation
- fails.
- (print_usage): Pump up help message.
- (print_version): Add output of default configuration file.
- (main): Accommodate new options. Allow overwrite of threading options
- from config file. Call several new initialization functions. Drop
- printing dots. Don't define SIGHANDLE inline.
- * cygserver.conf: New file.
- * cygserver_process.h: Rename to process.h.
- * cygserver_transport.h: Rename to transport.h.
- * cygserver_transport_pipes.h: Rename to transport_pipes.h.
- * cygserver_transport_sockets.h: Rename to transport_sockets.h.
- * msg.cc: Rewrite.
- * sem.cc: Rewrite.
- * shm.cc: Rewrite.
- * sysv_msg.cc: New file, derived from FreeBSD version 1.52.
- * sysv_sem.cc: New file, derived from FreeBSD version 1.66.
- * sysv_shm.cc: New file, derived from FreeBSD version 1.89.
- * threaded_queue.cc: Rearrange to build as less as possible if
- __INSIDE_CYGWIN__.
- * transport.cc (transport_layer_base::impersonate_client): Define bool.
- (transport_layer_base::revert_to_self): Ditto.
- * transport.h (transport_layer_base::impersonate_client): Declare bool.
- (transport_layer_base::revert_to_self): Ditto.
- * transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
- Don't call init_security.
- (init_security): Remove.
- (transport_layer_pipes::accept): Use global sec_all_nih.
- (transport_layer_pipes::connect): Ditto.
- (transport_layer_pipes::impersonate_client): Define bool.
- (transport_layer_pipes::revert_to_self): Ditt.
- * transport_pipes.h (transport_layer_pipes::impersonate_client): Declare
- bool.
- (transport_layer_pipes::revert_to_self): Ditto.
- * woutsup.h: Include bsd compatibility headers.
- (SIGHANDLE): Add definition.
- (__cygserver__printf): Remove definition.
- (__noop_printf): Ditto.
- (debug_printf): Define using debug.
- (syscall_printf): Define using log.
- (system_printf): Ditto.
- Drop all other _printf definitions.
-
-2003-10-22 Corinna Vinschen <corinna@vinschen.de>
-
- Accomodate moving cygserver header files from cygwin/include/cygwin
- to here and cygwin dir.
- * Makefile.in (EXEEXT): Drop as unused.
- (EXEEXT_FOR_BUILD): Ditto.
- (all): Don't build libcygserver.a.
- * cygserver_process.h: Moved from cygwin/include/cygwin to here.
- * cygserver_transport.h: Ditto.
- * cygserver_transport_pipes.h: Ditto.
- * cygserver_transport_sockets.h: Ditto.
- * ipc.h: Moved to ../cygwin and renamed to cygserver_ipc.h.
- * shm.h: Moved to ../cygwin and renamed to cygserver_shm.h.
-
-2003-08-30 Christopher Faylor <cgf@redhat.com>
-
- * msg.cc: New file.
- * sem.cc: Ditto.
-
-2003-08-30 Christopher Faylor <cgf@redhat.com>
-
- * threaded_queue.h: New file.
-
-2003-08-25 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in: Build libcygserver.a.
- * client.cc: Rename allow_daemon to allow_server.
-
-2003-07-25 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Use 'install-sh -c'.
- * configure: Regenerate.
-
-2003-07-25 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: Always use install-sh.
- * configure: Regenerate.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * Makefile.in (OBJS): Move some more files from cygwin directory.
- * woutsup.h: Define _MT_SAFE.
-
-2003-07-01 Christopher Faylor <cgf@redhat.com>
-
- * configure.in: First pass.
- * Makefile.in: Ditto.
- * configure: Generate.
diff --git a/winsup/cygserver/Makefile.in b/winsup/cygserver/Makefile.in
deleted file mode 100644
index 1b76a76..0000000
--- a/winsup/cygserver/Makefile.in
+++ /dev/null
@@ -1,91 +0,0 @@
-# Makefile for Cygwin server
-# Copyright 2003 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@
-sbindir:=@sbindir@
-sysconfdir:=@sysconfdir@
-program_transform_name:=@program_transform_name@
-
-INSTALL:=@INSTALL@
-INSTALL_PROGRAM:=@INSTALL_PROGRAM@
-INSTALL_DATA:=@INSTALL_DATA@
-
-CC:=@CC@
-CC_FOR_TARGET:=$(CC)
-CXX:=@CXX@
-CXX_FOR_TARGET:=$(CXX)
-AR:=@AR@
-
-include $(srcdir)/../Makefile.common
-
-CFLAGS:=@CFLAGS@
-CXXFLAGS:=@CXXFLAGS@
-override CXXFLAGS+=-MMD -DHAVE_DECL_GETOPT=0 -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
-
-.SUFFIXES: .c .cc .a .o .d
-
-OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
- transport.o transport_pipes.o transport_sockets.o \
- bsd_helper.o bsd_log.o bsd_mutex.o \
- sysv_msg.o sysv_sem.o sysv_shm.o
-LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
-
-CYGWIN_OBJS:=$(cygwin_build)/smallprint.o $(cygwin_build)/version.o \
- $(cygwin_build)/wincap.o
-
-CYGWIN_LIB:=$(cygwin_build)/libcygwin.a
-
-all: cygserver.exe
-
-install: all $(updir1)/mkinstalldirs cygserver.conf cygserver-config README
- $(updir1)/mkinstalldirs $(sbindir)
- $(updir1)/mkinstalldirs $(bindir)
- $(updir1)/mkinstalldirs $(sysconfdir)/defaults/etc
- $(updir1)/mkinstalldirs $(prefix)/share/doc/Cygwin
- $(INSTALL_PROGRAM) cygserver.exe $(sbindir)/cygserver.exe
- $(INSTALL_PROGRAM) $(srcdir)/cygserver-config $(bindir)/cygserver-config
- $(INSTALL_DATA) $(srcdir)/cygserver.conf $(sysconfdir)/defaults/etc/cygserver.conf
- $(INSTALL_DATA) $(srcdir)/README $(prefix)/share/doc/Cygwin/cygserver.README
-
-clean:
- rm -f $(OBJS) ${patsubst %.o,%.d,$(OBJS)} cygserver.exe
-
-libclean:
- rm -f $(LIBOBJS) ${patsubst %.o,%.d,$(LIBOBJS)} libcygserver.a
-
-fullclean: clean libclean
-
-cygserver.exe: $(CYGWIN_LIB) $(OBJS) $(CYGWIN_OBJS)
- $(CXX) -o $@ ${wordlist 2,999,$^} -L$(cygwin_build)
-
-$(cygwin_build)/%.o: $(cygwin_source)/%.cc
- @$(MAKE) -C $(@D) $(@F)
-
-$(cygwin_build)/%.o: $(cygwin_source)/%.c
- @$(MAKE) -C $(@D) $(@F)
-
-Makefile: Makefile.in configure
-
-lib%.o: %.cc
- ${filter-out -D__OUTSIDE_CYGWIN__, $(COMPILE_CXX)} -I$(updir)/cygwin -o $(@D)/${basename $(@F)}$o $<
-
-libcygserver.a: $(LIBOBJS)
- $(AR) crus $@ $?
-
-deps:=${wildcard *.d}
-ifneq (,$(deps))
-include $(deps)
-endif
diff --git a/winsup/cygserver/README b/winsup/cygserver/README
deleted file mode 100644
index 2099531..0000000
--- a/winsup/cygserver/README
+++ /dev/null
@@ -1,210 +0,0 @@
-What is Cygserver?
-
- Cygserver is a program which is designed to run as a background service.
- It provides Cygwin applications with services which require security
- arbitration or which need to persist while no other cygwin application
- is running.
-
- The implemented services so far are:
-
- - Control slave tty/pty handle dispersal from tty owner to other
- processes without compromising the owner processes' security.
- - XSI IPC Message Queues.
- - XSI IPC Semaphores.
- - XSI IPC Shared Memory.
-
-
-Cygserver command line options:
-
- Options to Cygserver take the normal UNIX-style `-X' or `--longoption' form.
- Nearly all options have a counterpart in the configuration file (see below)
- so setting them on the command line isn't really necessary. Command line
- options override settings from the Cygserver configuration file.
-
- The one-character options are prepended by a single dash, the long variants
- are prepended with two dashes. Arguments to options are marked in angle
- brackets below. These are not part of the actual syntax but are used only to
- denote the arguments. Note that all arguments are required. Cygserver
- has no options with optional arguments.
-
- The options recognized are:
-
- -f, --config-file <file>
-
- Use <file> as configuration file instead of the default configuration
- line. The default configuration file is /etc/cygserver.conf, typically.
- The --help and --version options will print the default configuration
- pathname.
-
- This option has no counterpart in the configuration file, for obvious
- reasons.
-
- -c, --cleanup-threads <num>
-
- Number of threads started to perform cleanup tasks. Default is 2.
- Configuration file option: kern.srv.cleanup_threads
-
- -r, --request-threads <num>
-
- Number of threads started to serve application requests. Default is 10.
- The -c and -r options can be used to play with Cygserver's performance
- under heavy load conditions or on slow machines.
- Configuration file option: kern.srv.request_threads
-
- -d, --debug
-
- Log debug messages to stderr. These will clutter your stderr output with
- a lot of information, typically only useful to developers.
-
- -e, --stderr
-
- Force logging to stderr. This is the default if stderr is connected to
- a tty. Otherwise, the default is logging to the system log. By using
- the -e, -E, -y, -Y options (or the appropriate settings in the
- configuration file), you can explicitely set the logging output as you
- like, even to both, stderr and syslog.
- Configuration file option: kern.log.stderr
-
- -E, --no-stderr
-
- Don't log to stderr. Configuration file option: kern.log.stderr
-
- -y, --syslog
-
- Force logging to the system log. This is the default, if stderr is not
- connected to a tty, e. g. redirected to a file. Note, that on 9x/Me
- systems the syslog is faked by a file C:\CYGWIN_SYSLOG.TXT.
- Configuration file option: kern.log.syslog
-
- -Y, --no-syslog
-
- Don't log to syslog. Configuration file option: kern.log.syslog
-
- -l, --log-level <level>
-
- Set the verbosity level of the logging output. Valid values are between
- 1 and 7. The default level is 6, which is relatively chatty. If you set
- it to 1, you will get only messages which are printed under severe conditions,
- which will result in stopping Cygserver itself.
- Configuration file option: kern.log.level
-
- -m, --no-sharedmem
-
- Don't start XSI IPC Shared Memory support. If you don't need XSI IPC
- Shared Memory support, you can switch it off here.
- Configuration file option: kern.srv.sharedmem
-
- -q, --no-msgqueues
-
- Don't start XSI IPC Message Queues.
- Configuration file option: kern.srv.msgqueues
-
- -s, --no-semaphores
-
- Don't start XSI IPC Semaphores.
- Configuration file option: kern.srv.semaphores
-
- -S, --shutdown
-
- Shutdown a running daemon and exit. Other methods are sending a SIGHUP
- to the Cygserver PID or, if running as service under NT, calling
- `net stop cygserver' or `cygrunsrv -E cygserver'.
-
- -h, --help
-
- Output usage information and exit.
-
- -v, --version
-
- Output version information and exit.
-
-
-How to start Cygserver:
-
- Before you run Cygserver for the first time, you should run the
- /usr/bin/cygserver-config script once. It creates the default
- configuration file and, upon request, installs Cygserver as service
- when running under NT. The script only performs a default install,
- with no further options given to Cygserver when running as service.
- Due to the wide configurability by changing the configuration file,
- that's typically not necessary.
-
- On Windows 9x/Me, just start Cygserver in any console window. It's
- advisable to redirect stderr to a file of choice (e. g.
- /var/log/cygserver.log) and to use the -e and -Y options or the
- set the appropriate settings in the configuration file (see below).
-
- On Windows NT/2000/XP or 2003, you should always run Cygserver as a
- service under LocalSystem account. This is the way it is installed
- for you by the /usr/bin/cygserver-config script.
-
-
-How to use the Cygserver services:
-
- The Cygserver services are used by Cygwin applications only if you
- set the environment variable CYGWIN to contain the string "server".
- You must do this before starting the application.
-
- Typically, you don't need any other option, so it's ok to set CYGWIN
- just to "server". It is not necessary to set the CYGWIN environment
- variable prior to starting the Cygserver process itself, but it won't
- hurt to do so.
-
- The easiest way is to set the environment variable CYGWIN to the values
- you want in the Windows system environment and to reboot the machine.
- This is advisable, since it allows you to set the variable once and
- then forget about it. It also ensures that services as well as desktop
- applications have the same setting.
-
- If you don't want that for whatever reason, you can set the
- variable in the /cygwin.bat file which is used in the net distribution,
- to start a Cygwin bash from the desktop. In that file, you can set
- the CYGWIN variable using Windows command line interpreter syntax, e. g.:
-
- set CYGWIN=server
-
- If you don't set CYGWIN in the system environment, but you're running
- other Cygwin services, these services need to get that CYGWIN value by
- setting the environment using the appropriate cygrunsrv option '-e' when
- installing the service. Example installing a service 'foo':
-
- cygrunsrv -I foo -p /usr/sbin/foo -e "CYGWIN=server"
-
-
-The Cygserver configuration file:
-
- Cygserver has many options, which allow to customize the server
- to your needs. Customization is accomplished by editing the configuration
- file, which is by default /etc/cygserver.conf. This file is read only
- once on startup of Cygserver. There's no option to re-read the file on
- runtime by, say, sending a signal to Cygserver.
-
- The configuration file determines how Cygserver operates. There are
- options which set the number of threads running in parallel, options
- for setting how and what to log and options to set various maximum
- values for the IPC services.
-
- The default configuration file delivered with Cygserver is installed
- to /etc/defaults/etc. The /usr/bin/cygserver-config script copies it to
- /etc, giving you the option to overwrite an already existing file or to
- leave it alone. Therefore, the /etc file is safe to be changed by you,
- since it will not be overwritten by a later update installation.
-
- The default configuration file contains many comments which describe
- everything needed to understand the settings. A comment at the start of the
- file describes the syntax rules for the file. The default options are shown
- in the file but are commented out.
-
- It is generally a good idea to uncomment only options which you intend to
- change from the default values. Since reading the options file on Cygserver
- startup doesn't take much time, it's also considered good practice to keep
- all other comments in the file. This keeps you from searching for clues
- in other sources.
-
-
-If you have problems with Cygserver, or you have found a bug, or you
-think you have found a bug, or you don't understand configuration file
-options, the mailing list <cygwin@cygwin.com> is the right place to ask
-questions.
-
-Have fun!
diff --git a/winsup/cygserver/bsd_helper.cc b/winsup/cygserver/bsd_helper.cc
deleted file mode 100644
index 9fb3c9b..0000000
--- a/winsup/cygserver/bsd_helper.cc
+++ /dev/null
@@ -1,697 +0,0 @@
-/* bsd_helper.cc
-
- Copyright 2003, 2004, 2005 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#include <errno.h>
-#define _KERNEL 1
-#define __BSD_VISIBLE 1
-#include <sys/smallprint.h>
-#include <sys/cygwin.h>
-#include <sys/ipc.h>
-#include <sys/param.h>
-#include <sys/msg.h>
-#include <sys/queue.h>
-#include <malloc.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include "security.h"
-#include "cygserver.h"
-#include "process.h"
-#include "cygserver_ipc.h"
-#include "cygserver_msg.h"
-#include "cygserver_sem.h"
-#include "cygserver_shm.h"
-
-/*
- * Copy a piece of memory from the client process into the server process.
- * Returns an error code.
- */
-int
-win_copyin (struct thread *td, const void *client_src,
- void *server_tgt, size_t len)
-{
- if (!ReadProcessMemory (td->client->handle (), client_src, server_tgt,
- len, NULL))
- return cygwin_internal (CW_GET_ERRNO_FROM_WINERROR,
- GetLastError (), EINVAL);
- return 0;
-}
-
-/*
- * Copy a piece of memory from the server process into the client process.
- * Returns an error code.
- */
-int
-win_copyout (struct thread *td, const void *server_src,
- void *client_tgt, size_t len)
-{
- if (!WriteProcessMemory (td->client->handle (), client_tgt, server_src,
- len, NULL))
- return cygwin_internal (CW_GET_ERRNO_FROM_WINERROR,
- GetLastError (), EINVAL);
- return 0;
-}
-
-#define enter_critical_section(c) _enter_critical_section((c),__FILE__,__LINE__)
-static void
-_enter_critical_section (LPCRITICAL_SECTION pcs, const char *file, int line)
-{
- _log (file, line, LOG_DEBUG, "Try enter critical section(%p)", pcs);
- EnterCriticalSection (pcs);
- _log (file, line, LOG_DEBUG, "Entered critical section(%p)", pcs);
-}
-
-#define leave_critical_section(c) _leave_critical_section((c),__FILE__,__LINE__)
-static void
-_leave_critical_section (LPCRITICAL_SECTION pcs, const char *file, int line)
-{
- LeaveCriticalSection (pcs);
- _log (file, line, LOG_DEBUG, "Left critical section(%p)", pcs);
-}
-
-CRITICAL_SECTION ipcht_cs;
-
-struct ipc_hookthread_storage {
- HANDLE process_hdl;
- proc ipcblk;
-};
-
-struct ipc_hookthread {
- SLIST_ENTRY (ipc_hookthread) sht_next;
- HANDLE thread;
- DWORD winpid;
- struct vmspace vmspace;
-};
-static SLIST_HEAD (, ipc_hookthread) ipcht_list; /* list of hook threads */
-
-static HANDLE ipcexit_event;
-
-struct vmspace *
-ipc_p_vmspace (struct proc *proc)
-{
- struct vmspace *ret = NULL;
- ipc_hookthread *ipcht_entry;
- enter_critical_section (&ipcht_cs);
- SLIST_FOREACH (ipcht_entry, &ipcht_list, sht_next)
- {
- if (ipcht_entry->winpid == proc->winpid)
- {
- ret = proc->p_vmspace = &ipcht_entry->vmspace;
- break;
- }
- }
- leave_critical_section (&ipcht_cs);
- return ret;
-}
-
-static DWORD WINAPI
-ipcexit_hookthread (const LPVOID param)
-{
- ipc_hookthread_storage *shs = (ipc_hookthread_storage *) param;
- HANDLE obj[2] = { ipcexit_event, shs->process_hdl };
- switch (WaitForMultipleObjects (2, obj, FALSE, INFINITE))
- {
- case WAIT_OBJECT_0:
- /* Cygserver shutdown. */
- /*FALLTHRU*/
- case WAIT_OBJECT_0 + 1:
- /* Process exited. Call semexit_myhook to handle SEM_UNDOs for the
- exiting process and shmexit_myhook to keep track of shared
- memory. */
- if (Giant.owner == shs->ipcblk.winpid)
- mtx_unlock (&Giant);
- if (support_semaphores == TUN_TRUE)
- semexit_myhook (NULL, &shs->ipcblk);
- if (support_sharedmem == TUN_TRUE)
- {
- _mtx_lock (&Giant, shs->ipcblk.winpid, __FILE__, __LINE__);
- ipc_p_vmspace (&shs->ipcblk);
- shmexit_myhook (shs->ipcblk.p_vmspace);
- mtx_unlock (&Giant);
- }
- break;
- default:
- /* FIXME: Panic? */
- break;
- }
- CloseHandle (shs->process_hdl);
- ipc_hookthread *ipcht_entry, *sav_entry;
- enter_critical_section (&ipcht_cs);
- SLIST_FOREACH_SAFE (ipcht_entry, &ipcht_list, sht_next, sav_entry)
- {
- if (ipcht_entry->winpid == shs->ipcblk.winpid)
- {
- SLIST_REMOVE (&ipcht_list, ipcht_entry, ipc_hookthread, sht_next);
- CloseHandle (ipcht_entry->thread);
- delete ipcht_entry;
- }
- }
- leave_critical_section (&ipcht_cs);
- delete shs;
- return 0;
-}
-
-/* Deletes all pending hook threads. Called by ipcunload() which in turn
- is called by the cygserver main routine. */
-static void
-ipcexit_dispose_hookthreads (void)
-{
- SetEvent (ipcexit_event);
- ipc_hookthread *ipcht_entry;
- enter_critical_section (&ipcht_cs);
- SLIST_FOREACH (ipcht_entry, &ipcht_list, sht_next)
- {
- WaitForSingleObject (ipcht_entry->thread, 1000);
- /* Don't bother removing the linked list on cygserver shutdown. */
- /* FIXME: Error handling? */
- }
- leave_critical_section (&ipcht_cs);
-}
-
-/* Creates the per process wait thread. Called by semget() under locked
- Giant mutex condition. */
-int
-ipcexit_creat_hookthread (struct thread *td)
-{
- ipc_hookthread *ipcht_entry;
- int ret = -1;
- enter_critical_section (&ipcht_cs);
- SLIST_FOREACH (ipcht_entry, &ipcht_list, sht_next)
- {
- if (ipcht_entry->winpid == td->ipcblk->winpid)
- ret = 0;
- }
- leave_critical_section (&ipcht_cs);
- if (!ret)
- return 0;
-
- DWORD tid;
- ipc_hookthread_storage *shs = new ipc_hookthread_storage;
- if (!DuplicateHandle (GetCurrentProcess (), td->client->handle (),
- GetCurrentProcess (), &shs->process_hdl,
- 0, FALSE, DUPLICATE_SAME_ACCESS))
- {
- log (LOG_CRIT, "failed to duplicate process handle, error = %lu",
- GetLastError ());
- return cygwin_internal (CW_GET_ERRNO_FROM_WINERROR,
- GetLastError (), ENOMEM);
- }
- shs->ipcblk = *td->ipcblk;
- HANDLE thread = CreateThread (NULL, 0, ipcexit_hookthread, shs, 0, &tid);
- if (!thread)
- {
- log (LOG_CRIT, "failed to create thread, error = %lu", GetLastError ());
- return cygwin_internal (CW_GET_ERRNO_FROM_WINERROR,
- GetLastError (), ENOMEM);
- }
- ipcht_entry = new ipc_hookthread;
- ipcht_entry->thread = thread;
- ipcht_entry->winpid = td->ipcblk->winpid;
- ipcht_entry->vmspace.vm_map = NULL;
- ipcht_entry->vmspace.vm_shm = NULL;
- enter_critical_section (&ipcht_cs);
- SLIST_INSERT_HEAD (&ipcht_list, ipcht_entry, sht_next);
- leave_critical_section (&ipcht_cs);
- return 0;
-}
-
-/*
- * Need the admins group SID to compare with groups in client token.
- */
-PSID admininstrator_group_sid;
-
-static void
-init_admin_sid (void)
-{
- if (wincap.has_security ())
- {
- SID_IDENTIFIER_AUTHORITY nt_auth = {SECURITY_NT_AUTHORITY};
- if (! AllocateAndInitializeSid (&nt_auth, 2, 32, 544, 0, 0, 0, 0, 0, 0,
- &admininstrator_group_sid))
- panic ("failed to create well known sids, error = %lu",
- GetLastError ());
- }
-}
-
-SECURITY_DESCRIPTOR sec_all_nih_sd;
-SECURITY_ATTRIBUTES sec_all_nih = { sizeof (SECURITY_ATTRIBUTES),
- &sec_all_nih_sd,
- FALSE };
-
-/* Global vars, determining whether the IPC stuff should be started or not. */
-tun_bool_t support_sharedmem = TUN_UNDEF;
-tun_bool_t support_msgqueues = TUN_UNDEF;
-tun_bool_t support_semaphores = TUN_UNDEF;
-
-void
-ipcinit ()
-{
- InitializeSecurityDescriptor (&sec_all_nih_sd, SECURITY_DESCRIPTOR_REVISION);
- SetSecurityDescriptorDacl (&sec_all_nih_sd, TRUE, 0, FALSE);
-
- init_admin_sid ();
- mtx_init (&Giant, "Giant", NULL, MTX_DEF);
- msleep_init ();
- ipcexit_event = CreateEvent (NULL, TRUE, FALSE, NULL);
- if (!ipcexit_event)
- panic ("Failed to create ipcexit event object");
- InitializeCriticalSection (&ipcht_cs);
- if (support_msgqueues == TUN_TRUE)
- msginit ();
- if (support_semaphores == TUN_TRUE)
- seminit ();
- if (support_sharedmem == TUN_TRUE)
- shminit ();
-}
-
-int
-ipcunload ()
-{
- ipcexit_dispose_hookthreads ();
- CloseHandle (ipcexit_event);
- wakeup_all ();
- if (support_semaphores == TUN_TRUE)
- semunload ();
- if (support_sharedmem == TUN_TRUE)
- shmunload ();
- if (support_msgqueues == TUN_TRUE)
- msgunload ();
- mtx_destroy (&Giant);
- return 0;
-}
-
-/*
- * Helper function to find a gid in a list of gids.
- */
-static bool
-is_grp_member (gid_t grp, gid_t *grplist, int listsize)
-{
- if (grplist)
- for (; listsize > 0; --listsize)
- if (grp == grplist[listsize - 1])
- return true;
- return false;
-}
-
-/*
- * Helper function to get a specific token information from a token.
- * This function mallocs the necessary buffer spcae by itself. It
- * must be free'd by the calling function.
- */
-static void *
-get_token_info (HANDLE tok, TOKEN_INFORMATION_CLASS tic)
-{
- void *buf;
- DWORD size;
-
- if (!GetTokenInformation (tok, tic, NULL, 0, &size)
- && GetLastError () != ERROR_INSUFFICIENT_BUFFER)
- return NULL;
- if (!(buf = malloc (size)))
- return NULL;
- if (!GetTokenInformation (tok, tic, buf, size, &size))
- {
- free (buf);
- return NULL;
- }
- return buf;
-}
-
-/*
- * Check if client user helds "mode" permission when accessing object
- * associated with "perm" permission record.
- * Returns an error code.
- */
-int
-ipcperm (struct thread *td, ipc_perm *perm, unsigned int mode)
-{
- proc *p = td->ipcblk;
-
- if (!suser (td))
- return 0;
- if (mode & IPC_M)
- {
- return (p->uid != perm->cuid && p->uid != perm->uid)
- ? EACCES : 0;
- }
- if (p->uid != perm->cuid && p->uid != perm->uid)
- {
- /* If the user is a member of the creator or owner group, test
- against group bits, otherwise against other bits. */
- mode >>= p->gid != perm->gid && p->gid != perm->cgid
- && !is_grp_member (perm->gid, p->gidlist, p->gidcnt)
- && !is_grp_member (perm->cgid, p->gidlist, p->gidcnt)
- ? 6 : 3;
- }
- return (mode & perm->mode) != mode ? EACCES : 0;
-}
-
-/*
- * Check for client user being superuser.
- * Returns an error code.
- */
-int
-suser (struct thread *td)
-{
- /* Always superuser on 9x. */
- if (!wincap.has_security ())
- return 0;
-
- /* This value has been set at ImpersonateNamedPipeClient() time
- using the token information. See adjust_identity_info() below. */
- return td->ipcblk->is_admin ? 0 : EACCES;
-}
-
-/*
- * Retrieves user and group info from impersonated token and creates the
- * correct uid, gid, gidlist and is_admin entries in p from that.
- */
-bool
-adjust_identity_info (struct proc *p)
-{
- HANDLE tok;
-
- /* No access tokens on 9x. */
- if (!wincap.has_security ())
- return true;
-
- if (!OpenThreadToken (GetCurrentThread (), TOKEN_READ, TRUE, &tok))
- {
- debug ("Failed to open worker thread access token for pid %d, winpid %d",
- p->cygpid, p->winpid);
- return false;
- }
-
- /* Get uid from user SID in token. */
- PTOKEN_USER user;
- if (!(user = (PTOKEN_USER)get_token_info (tok, TokenUser)))
- goto faulty;
- p->uid = cygwin_internal (CW_GET_UID_FROM_SID, user->User.Sid);
- free (user);
- if (p->uid == (uid_t)-1)
- log (LOG_WARNING, "WARNING: User not found in /etc/passwd! Using uid -1!");
-
- /* Get gid from primary group SID in token. */
- PTOKEN_PRIMARY_GROUP pgrp;
- if (!(pgrp = (PTOKEN_PRIMARY_GROUP)get_token_info (tok, TokenPrimaryGroup)))
- goto faulty;
- p->gid = cygwin_internal (CW_GET_GID_FROM_SID, pgrp->PrimaryGroup);
- free (pgrp);
- if (p->gid == (gid_t)-1)
- log (LOG_WARNING,"WARNING: Group not found in /etc/passwd! Using gid -1!");
-
- /* Generate gid list from token group's SID list. Also look if the token
- has an enabled admin group SID. That means, the process has admin
- privileges. That knowledge is used in suser(). */
- PTOKEN_GROUPS gsids;
- if (!(gsids = (PTOKEN_GROUPS)get_token_info (tok, TokenGroups)))
- goto faulty;
- if (gsids->GroupCount)
- {
- p->gidlist = (gid_t *) calloc (gsids->GroupCount, sizeof (gid_t));
- if (p->gidlist)
- p->gidcnt = gsids->GroupCount;
- }
- for (DWORD i = 0; i < gsids->GroupCount; ++i)
- {
- if (p->gidlist)
- p->gidlist[i] = cygwin_internal (CW_GET_GID_FROM_SID,
- gsids->Groups[i].Sid);
- if (EqualSid (gsids->Groups[i].Sid, admininstrator_group_sid)
- && (gsids->Groups[i].Attributes & SE_GROUP_ENABLED))
- p->is_admin = true;
- }
- free (gsids);
-
- CloseHandle (tok);
- return true;
-
-faulty:
- CloseHandle (tok);
- log (LOG_CRIT, "Failed to get token information for pid %d, winpid %d",
- p->cygpid, p->winpid);
- return false;
-}
-
-/*
- * Windows wrapper implementation of the VM functions called by sysv_shm.cc.
- */
-
-vm_object_t
-_vm_pager_allocate (int size, int shmflg)
-{
- /* Create the file mapping object with full access for everyone. This is
- necessary to allow later calls to shmctl(..., IPC_SET,...) to
- change the access rights and ownership of a shared memory region.
- The access rights are tested at the beginning of every shm... function.
- Note that this does not influence the actual read or write access
- defined in a call to shmat. */
- vm_object_t object = CreateFileMapping (INVALID_HANDLE_VALUE, &sec_all_nih,
- PAGE_READWRITE, 0, size, NULL);
- if (!object)
- panic ("CreateFileMapping in _vm_pager_allocate failed, %E");
- return object;
-}
-
-vm_object_t
-vm_object_duplicate (struct thread *td, vm_object_t object)
-{
- vm_object_t dup_object;
- if (!DuplicateHandle (GetCurrentProcess (), object,
- td->client->handle (), &dup_object,
- 0, TRUE, DUPLICATE_SAME_ACCESS))
- panic ("!DuplicateHandle in vm_object_duplicate failed, %E");
- return dup_object;
-}
-
-void
-vm_object_deallocate (vm_object_t object)
-{
- if (object)
- CloseHandle (object);
-}
-
-/*
- * Tunable parameters are read from a system wide cygserver.conf file.
- * On the first call to tunable_int_fetch, the file is read and the
- * parameters are set accordingly. Each parameter has default, max and
- * min settings.
- */
-
-enum tun_params_type {
- TUN_NULL,
- TUN_INT,
- TUN_BOOL
-};
-
-union tun_value {
- long ival;
- tun_bool_t bval;
-};
-
-struct tun_struct {
- const char *name;
- tun_params_type type;
- union tun_value value;
- union tun_value min;
- union tun_value max;
- void (*check_func)(tun_struct *, char *, const char *);
-};
-
-static void
-default_tun_check (tun_struct *that, char *value, const char *fname)
-{
- char *c = NULL;
- tun_value val;
- switch (that->type)
- {
- case TUN_INT:
- val.ival = strtoul (value, &c, 10);
- if (!val.ival || (c && *c))
- panic ("Error in config file %s: Value of parameter %s malformed",
- fname, that->name);
- if (val.ival < that->min.ival || val.ival > that->max.ival)
- panic ("Error in config file %s: Value of parameter %s must be "
- "between %lu and %lu",
- fname, that->name, that->min.ival, that->max.ival);
- if (that->value.ival)
- panic ("Error in config file %s: Parameter %s set twice.\n",
- fname, that->name);
- that->value.ival = val.ival;
- break;
- case TUN_BOOL:
- if (!strcasecmp (value, "no") || !strcasecmp (value, "n")
- || !strcasecmp (value, "false") || !strcasecmp (value, "f")
- || !strcasecmp (value, "0"))
- val.bval = TUN_FALSE;
- else if (!strcasecmp (value, "yes") || !strcasecmp (value, "y")
- || !strcasecmp (value, "true") || !strcasecmp (value, "t")
- || !strcasecmp (value, "1"))
- val.bval = TUN_TRUE;
- else
- panic ("Error in config file %s: Value of parameter %s malformed\n"
- "Allowed values: \"yes\", \"no\", \"y\", \"n\", \"true\", \"false\", \"t\", \"f\", \"1\" and \"0\"", fname, that->name);
- that->value.bval = val.bval;
- break;
- default:
- /* Shouldn't happen. */
- panic ("Internal error: Wrong type of tunable parameter");
- break;
- }
-}
-
-static tun_struct tunable_params[] =
-{
- /* SRV */
- { "kern.srv.cleanup_threads", TUN_INT, {0}, {1}, {16}, default_tun_check},
- { "kern.srv.request_threads", TUN_INT, {0}, {1}, {64}, default_tun_check},
- { "kern.srv.sharedmem", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, default_tun_check},
- { "kern.srv.msgqueues", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, default_tun_check},
- { "kern.srv.semaphores", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, default_tun_check},
-
- /* LOG */
- { "kern.log.syslog", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, default_tun_check},
- { "kern.log.stderr", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, default_tun_check},
- { "kern.log.debug", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, default_tun_check},
- { "kern.log.level", TUN_INT, {0}, {1}, {7}, default_tun_check},
-
- /* MSG */
- { "kern.ipc.msgseg", TUN_INT, {0}, {256}, {65535}, default_tun_check},
- { "kern.ipc.msgssz", TUN_INT, {0}, {8}, {1024}, default_tun_check},
- { "kern.ipc.msgmnb", TUN_INT, {0}, {1}, {65535}, default_tun_check},
- { "kern.ipc.msgmni", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.msgtql", TUN_INT, {0}, {1}, {1024}, default_tun_check},
-
- /* SEM */
- //{ "kern.ipc.semmap", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.semmni", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.semmns", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.semmnu", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.semmsl", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.semopm", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.semume", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- //{ "kern.ipc.semusz", TUN_INT, {0}, {1}, {1024}, default_tun_check},
- { "kern.ipc.semvmx", TUN_INT, {0}, {1}, {32767}, default_tun_check},
- { "kern.ipc.semaem", TUN_INT, {0}, {1}, {32767}, default_tun_check},
-
- /* SHM */
- { "kern.ipc.shmmaxpgs", TUN_INT, {0}, {1}, {32767}, default_tun_check},
- //{ "kern.ipc.shmmin", TUN_INT, {0}, {1}, {32767}, default_tun_check},
- { "kern.ipc.shmmni", TUN_INT, {0}, {1}, {32767}, default_tun_check},
- { "kern.ipc.shmseg", TUN_INT, {0}, {1}, {32767}, default_tun_check},
- //{ "kern.ipc.shm_use_phys", TUN_INT, {0}, {1}, {32767}, default_tun_check},
- { NULL, TUN_NULL, {0}, {0}, {0}, NULL}
-};
-
-#define skip_whitespace(c) while (*(c) && isspace (*(c))) ++(c)
-#define skip_nonwhitespace(c) while (*(c) && !isspace (*(c)) && *(c) != '#') ++(c)
-#define end_of_content(c) (!*(c) || *(c) == '#')
-
-void
-tunable_param_init (const char *config_file, bool force)
-{
- FILE *fp = fopen (config_file, "rt");
- if (!fp)
- {
- if (force)
- panic ("can't open config file %s\n", config_file);
- return;
- }
- char line[1024];
- while (fgets (line, 1024, fp))
- {
- char *c = strrchr (line, '\n');
- if (!c)
- panic ("Line too long in confg file %s\n", config_file);
- /* Overwrite trailing NL. */
- *c = '\0';
- c = line;
- skip_whitespace (c);
- if (end_of_content (c))
- continue;
- /* So we are on the first character of a parameter name. */
- char *name = c;
- /* Find end of name. */
- skip_nonwhitespace (c);
- if (end_of_content (c))
- {
- *c++ = '\0';
- panic ("Error in config file %s: Parameter %s has no value.\n",
- config_file, name);
- }
- /* Mark end of name. */
- *c++ = '\0';
- skip_whitespace (c);
- if (end_of_content (c))
- panic ("Error in config file %s: Parameter %s has no value.\n",
- config_file, name);
- /* Now we are on the first character of a parameter's value. */
- char *value = c;
- /* This only works for simple parameters. If complex string parameters
- are added at one point, the scanning routine must be changed here. */
- /* Find end of value. */
- skip_nonwhitespace (c);
- /* Mark end of value. */
- *c++ = '\0';
- /* Now look if name is one from our list. */
- tun_struct *s;
- for (s = &tunable_params[0]; s->name; ++s)
- if (!strcmp (name, s->name))
- {
- /* Now read value and check for validity. check_func doesn't
- return on error. */
- s->check_func (s, value, config_file);
- break;
- }
- if (!s->name)
- panic ("Error in config file %s: Unknown parameter %s.\n",
- config_file, name);
- }
- fclose (fp);
-}
-
-void
-tunable_int_fetch (const char *name, long *tunable_target)
-{
- tun_struct *s;
- for (s = &tunable_params[0]; s->name; ++s)
- if (!strcmp (name, s->name))
- break;
- if (!s) /* Not found */
- return;
- if (s->type != TUN_INT) /* Wrong type */
- return;
- if (!s->value.ival) /* Not set in config file */
- return;
- *tunable_target = s->value.ival;
- debug ("\nSet %s to %lu\n", name, *tunable_target);
-}
-
-void
-tunable_bool_fetch (const char *name, tun_bool_t *tunable_target)
-{
- tun_struct *s;
- const char *tun_bool_val_string[] = { "undefined", "no", "yes" };
- for (s = &tunable_params[0]; s->name; ++s)
- if (!strcmp (name, s->name))
- break;
- if (!s) /* Not found */
- return;
- if (s->type != TUN_BOOL) /* Wrong type */
- return;
- if (!s->value.ival) /* Not set in config file */
- return;
- *tunable_target = s->value.bval;
- debug ("\nSet %s to %s\n", name, tun_bool_val_string[*tunable_target]);
-}
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/bsd_helper.h b/winsup/cygserver/bsd_helper.h
deleted file mode 100644
index 14849e9..0000000
--- a/winsup/cygserver/bsd_helper.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* bsd_helper.h: Helps integrating BSD kernel code
-
- Copyright 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-#ifndef _BSD_HELPER_H
-#define _BSD_HELPER_H
-
-#include <sys/types.h>
-#include <sys/syslog.h>
-
-enum tun_bool_t {
- TUN_UNDEF = 0,
- TUN_FALSE = 1,
- TUN_TRUE = 2
-};
-
-#define TUNABLE_INT_FETCH(a,b) tunable_int_fetch((a),(b))
-#define TUNABLE_BOOL_FETCH(a,b) tunable_bool_fetch((a),(b))
-
-#define sys_malloc(a,b,c) (malloc(a)?:(panic("malloc failed in %s, line %d"),(void*)NULL))
-#define sys_free(a,b) free(a)
-
-#define jail_sysvipc_allowed true
-#define jailed(a) false
-
-extern const char *__progname;
-
-/* Global vars, determining whether the IPC stuff should be started or not. */
-extern tun_bool_t support_sharedmem;
-extern tun_bool_t support_msgqueues;
-extern tun_bool_t support_semaphores;
-
-extern SECURITY_ATTRIBUTES sec_all_nih;
-
-int win_copyin (struct thread *, const void *, void *, size_t);
-int win_copyout (struct thread *, const void *, void *, size_t);
-#define copyin(a,b,c) win_copyin((td),(a),(b),(c))
-#define copyout(a,b,c) win_copyout((td),(a),(b),(c))
-
-int ipcperm (struct thread *, struct ipc_perm *, unsigned int);
-int suser (struct thread *);
-bool adjust_identity_info (struct proc *p);
-
-struct vmspace *ipc_p_vmspace (struct proc *);
-int ipcexit_creat_hookthread(struct thread *);
-void ipcinit (void);
-int ipcunload (void);
-
-vm_object_t _vm_pager_allocate (int, int);
-#define vm_pager_allocate(a,b,s,c,d) _vm_pager_allocate((s),(mode))
-vm_object_t vm_object_duplicate (struct thread *td, vm_object_t object);
-void vm_object_deallocate (vm_object_t object);
-
-void tunable_param_init (const char *, bool);
-void tunable_int_fetch (const char *, long *);
-void tunable_bool_fetch (const char *, tun_bool_t *);
-
-#endif /* _BSD_HELPER_H */
diff --git a/winsup/cygserver/bsd_log.cc b/winsup/cygserver/bsd_log.cc
deleted file mode 100644
index 4b0ff74..0000000
--- a/winsup/cygserver/bsd_log.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-/* bsd_log.cc
-
- Copyright 2003, 2004 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. */
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#define _KERNEL 1
-#define __BSD_VISIBLE 1
-#include <sys/smallprint.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-long log_level = 8; /* Illegal value. Don't change! */
-tun_bool_t log_debug = TUN_UNDEF;
-tun_bool_t log_syslog = TUN_UNDEF;
-tun_bool_t log_stderr = TUN_UNDEF;
-
-void
-loginit (tun_bool_t opt_stderr, tun_bool_t opt_syslog)
-{
- if (log_debug == TUN_UNDEF)
- TUNABLE_BOOL_FETCH ("kern.log.debug", &log_debug);
- if (log_debug == TUN_UNDEF)
- log_debug = TUN_FALSE;
-
- if (opt_stderr != TUN_UNDEF)
- log_stderr = opt_stderr;
- else
- TUNABLE_BOOL_FETCH ("kern.log.stderr", &log_stderr);
- if (log_stderr == TUN_UNDEF)
- log_stderr = TUN_FALSE;
-
- if (opt_syslog != TUN_UNDEF)
- log_syslog = opt_syslog;
- else
- TUNABLE_BOOL_FETCH ("kern.log.syslog", &log_syslog);
- if (log_syslog == TUN_UNDEF)
- log_syslog = TUN_FALSE;
-
- if (log_level == 8)
- TUNABLE_INT_FETCH ("kern.log.level", &log_level);
- if (log_level == 8)
- log_level = 6;
-}
-
-void
-_vlog (const char *file, int line, int level,
- const char *fmt, va_list ap)
-{
- char buf[16384];
-
- if ((level == LOG_DEBUG && log_debug != TUN_TRUE)
- || (level != LOG_DEBUG && level >= log_level))
- return;
- strcpy (buf, "cygserver: ");
- if (file && log_debug == TUN_TRUE)
- __small_sprintf (strchr (buf, '\0'), "%s, line %d: ", file, line);
- __small_vsprintf (strchr (buf, '\0'), fmt, ap);
- if (log_syslog == TUN_TRUE && level != LOG_DEBUG)
- syslog (level, buf);
- if (log_stderr == TUN_TRUE || level == LOG_DEBUG)
- {
- fputs (buf, stderr);
- fputc ('\n', stderr);
- }
-}
-
-void
-_log (const char *file, int line, int level, const char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- _vlog (file, line, level, fmt, ap);
-}
-
-void
-_vpanic (const char *file, int line, const char *fmt, va_list ap)
-{
- _vlog (file, line, LOG_EMERG, fmt, ap);
- exit (1);
-}
-
-void
-_panic (const char *file, int line, const char *fmt, ...)
-{
- va_list ap;
- va_start (ap, fmt);
- _vpanic (file, line, fmt, ap);
-}
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/bsd_log.h b/winsup/cygserver/bsd_log.h
deleted file mode 100644
index 4857318..0000000
--- a/winsup/cygserver/bsd_log.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* bsd_log.h: Helps integrating BSD kernel code
-
- Copyright 2003 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-#ifndef _BSD_LOG_H
-#define _BSD_LOG_H
-
-#include <sys/types.h>
-#include <sys/syslog.h>
-
-extern long log_level;
-extern tun_bool_t log_debug;
-extern tun_bool_t log_syslog;
-extern tun_bool_t log_stderr;
-
-void loginit (tun_bool_t, tun_bool_t);
-void _vlog (const char *, int, int, const char *, va_list);
-void _log (const char *, int, int, const char *, ...);
-void _vpanic (const char *, int, const char *, va_list) __attribute__ ((noreturn));
-void _panic (const char *, int, const char *, ...) __attribute__ ((noreturn));
-#define vlog(l,f,a) _vlog(NULL,0,(l),(f),(a))
-#define log(l,f,...) _log(NULL,0,(l),(f),##__VA_ARGS__)
-#define vdebug(f,a) _vlog(__FILE__,__LINE__,LOG_DEBUG,(f),(a))
-#define debug(f,...) _log(__FILE__,__LINE__,LOG_DEBUG,(f),##__VA_ARGS__)
-#define vpanic(f,a) _vpanic(__FILE__,__LINE__,(f),(a))
-#define panic(f,...) _panic(__FILE__,__LINE__,(f),##__VA_ARGS__)
-
-#endif /* _BSD_LOG_H */
diff --git a/winsup/cygserver/bsd_mutex.cc b/winsup/cygserver/bsd_mutex.cc
deleted file mode 100644
index bbd7fd2..0000000
--- a/winsup/cygserver/bsd_mutex.cc
+++ /dev/null
@@ -1,387 +0,0 @@
-/* bsd_mutex.cc
-
- Copyright 2003, 2004, 2005 Red Hat Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#include <errno.h>
-#define _KERNEL 1
-#define __BSD_VISIBLE 1
-#include <sys/smallprint.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <sys/msg.h>
-#include <sys/sem.h>
-
-#include "process.h"
-#include "cygserver_ipc.h"
-
-/* A BSD kernel global mutex. */
-struct mtx Giant;
-
-void
-mtx_init (mtx *m, const char *name, const void *, int)
-{
- m->name = name;
- m->owner = 0;
- m->cnt = 0;
- /* Can't use Windows Mutexes here since Windows Mutexes are only
- unlockable by the lock owner. */
- m->h = CreateSemaphore (NULL, 1, 1, NULL);
- if (!m->h)
- panic ("couldn't allocate %s mutex, %E\n", name);
-}
-
-void
-_mtx_lock (mtx *m, DWORD winpid, const char *file, int line)
-{
- _log (file, line, LOG_DEBUG, "Try locking mutex %s (%u) (hold: %u)",
- m->name, winpid, m->owner);
- if (WaitForSingleObject (m->h, INFINITE) != WAIT_OBJECT_0)
- _panic (file, line, "wait for %s in %d failed, %E", m->name, winpid);
- m->owner = winpid;
- _log (file, line, LOG_DEBUG, "Locked mutex %s/%u (%u)",
- m->name, ++m->cnt, winpid);
-}
-
-int
-mtx_owned (mtx *m, DWORD winpid)
-{
- return m->owner == winpid;
-}
-
-void
-_mtx_assert (mtx *m, int what, DWORD winpid, const char *file, int line)
-{
- switch (what)
- {
- case MA_OWNED:
- if (!mtx_owned (m, winpid))
- _panic (file, line, "Mutex %s not owned", m->name);
- break;
- case MA_NOTOWNED:
- if (mtx_owned (m, winpid))
- _panic (file, line, "Mutex %s is owned", m->name);
- break;
- default:
- break;
- }
-}
-
-void
-_mtx_unlock (mtx *m, const char *file, int line)
-{
- DWORD owner = m->owner;
- unsigned long cnt = m->cnt;
- m->owner = 0;
- /* Cautiously check if mtx_destroy has been called (shutdown).
- In that case, m->h is NULL. */
- if (m->h && !ReleaseSemaphore (m->h, 1, NULL))
- {
- /* Check if the semaphore was already on it's max value. In this case,
- ReleaseSemaphore returns FALSE with an error code which *sic* depends
- on the OS. */
- if ( (!wincap.is_winnt () && GetLastError () != ERROR_INVALID_PARAMETER)
- || (wincap.is_winnt () && GetLastError () != ERROR_TOO_MANY_POSTS))
- _panic (file, line, "release of mutex %s failed, %E", m->name);
- }
- _log (file, line, LOG_DEBUG, "Unlocked mutex %s/%u (owner: %u)",
- m->name, cnt, owner);
-}
-
-void
-mtx_destroy (mtx *m)
-{
- HANDLE tmp = m->h;
- m->h = NULL;
- if (tmp)
- CloseHandle (tmp);
-}
-
-/*
- * Helper functions for msleep/wakeup.
- */
-
-static int
-win_priority (int priority)
-{
- int p = (int)((priority) & PRIO_MASK) - PZERO;
- /* Generating a valid priority value is a bit tricky. The only valid
- values on 9x and NT4 are -15, -2, -1, 0, 1, 2, 15. */
- switch (p)
- {
- case -15: case -14: case -13: case -12: case -11:
- return THREAD_PRIORITY_IDLE;
- case -10: case -9: case -8: case -7: case -6:
- return THREAD_PRIORITY_LOWEST;
- case -5: case -4: case -3: case -2: case -1:
- return THREAD_PRIORITY_BELOW_NORMAL;
- case 0:
- return THREAD_PRIORITY_NORMAL;
- case 1: case 2: case 3: case 4: case 5:
- return THREAD_PRIORITY_ABOVE_NORMAL;
- case 6: case 7: case 8: case 9: case 10:
- return THREAD_PRIORITY_HIGHEST;
- case 11: case 12: case 13: case 14: case 15:
- return THREAD_PRIORITY_TIME_CRITICAL;
- }
- return THREAD_PRIORITY_NORMAL;
-}
-
-/*
- * Sets the thread priority, returns the old priority.
- */
-static int
-set_priority (int priority)
-{
- int old_prio = GetThreadPriority (GetCurrentThread ());
- if (!SetThreadPriority (GetCurrentThread (), win_priority (priority)))
- log (LOG_WARNING,
- "Warning: Setting thread priority to %d failed with error %lu\n",
- win_priority (priority), GetLastError ());
- return old_prio;
-}
-
-/*
- * Original description from BSD code:
- *
- * General sleep call. Suspends the current process until a wakeup is
- * performed on the specified identifier. The process will then be made
- * runnable with the specified priority. Sleeps at most timo/hz seconds
- * (0 means no timeout). If pri includes PCATCH flag, signals are checked
- * before and after sleeping, else signals are not checked. Returns 0 if
- * awakened, EWOULDBLOCK if the timeout expires. If PCATCH is set and a
- * signal needs to be delivered, ERESTART is returned if the current system
- * call should be restarted if possible, and EINTR is returned if the system
- * call should be interrupted by the signal (return EINTR).
- *
- * The mutex argument is exited before the caller is suspended, and
- * entered before msleep returns. If priority includes the PDROP
- * flag the mutex is not entered before returning.
- */
-static HANDLE msleep_glob_evt;
-
-class msleep_sync_array
-{
- enum msleep_action {
- MSLEEP_ENTER = 0,
- MSLEEP_LEAVE,
- MSLEEP_WAKEUP
- };
-
- CRITICAL_SECTION cs;
- long cnt;
- long max_cnt;
- struct msleep_record {
- void *ident;
- HANDLE wakeup_evt;
- LONG threads;
- } *a;
-
- int find_ident (void *ident, msleep_action action)
- {
- int i;
- for (i = 0; i < cnt; ++i)
- if (a[i].ident == ident)
- return i;
- if (i >= max_cnt)
- panic ("ident %x not found and run out of slots.", ident);
- if (i >= cnt && action == MSLEEP_LEAVE)
- panic ("ident %x not found (%d).", ident, action);
- return i;
- }
-
- HANDLE first_entry (int i, void *ident)
- {
- debug ("New ident %x, index %d", ident, i);
- a[i].ident = ident;
- a[i].wakeup_evt = CreateEvent (NULL, TRUE, FALSE, NULL);
- if (!a[i].wakeup_evt)
- panic ("CreateEvent failed: %E");
- debug ("i = %d, CreateEvent: %x", i, a[i].wakeup_evt);
- a[i].threads = 1;
- ++cnt;
- return a[i].wakeup_evt;
- }
-
- HANDLE next_entry (int i)
- {
- if (a[i].ident && WaitForSingleObject (a[i].wakeup_evt, 0) != WAIT_OBJECT_0)
- {
- ++a[i].threads;
- return a[i].wakeup_evt;
- }
- return NULL;
- }
-
-public:
-
- msleep_sync_array (int count) : cnt (0), max_cnt (count)
- {
- InitializeCriticalSection (&cs);
- if (!(a = new msleep_record[count]))
- panic ("Allocating msleep records failed: %d", errno);
- }
-
- HANDLE enter (void *ident)
- {
- HANDLE evt = NULL;
- while (!evt)
- {
- EnterCriticalSection (&cs);
- int i = find_ident (ident, MSLEEP_ENTER);
- if (i >= cnt)
- evt = first_entry (i, ident);
- else if (!(evt = next_entry (i)))
- {
- /* wakeup has been called, so sleep to wait until all
- formerly waiting threads have left and retry. */
- LeaveCriticalSection (&cs);
- Sleep (1L);
- }
- }
- LeaveCriticalSection (&cs);
- return evt;
- }
-
- void leave (void *ident)
- {
- EnterCriticalSection (&cs);
- int i = find_ident (ident, MSLEEP_LEAVE);
- if (--a[i].threads == 0)
- {
- debug ("i = %d, CloseEvent: %x", i, a[i].wakeup_evt);
- CloseHandle (a[i].wakeup_evt);
- a[i].ident = NULL;
- --cnt;
- if (i < cnt)
- a[i] = a[cnt];
- }
- LeaveCriticalSection (&cs);
- }
-
- void wakeup (void *ident)
- {
- EnterCriticalSection (&cs);
- int i = find_ident (ident, MSLEEP_WAKEUP);
- if (i < cnt && a[i].ident)
- SetEvent (a[i].wakeup_evt);
- LeaveCriticalSection (&cs);
- }
-};
-
-static msleep_sync_array *msleep_sync;
-
-void
-msleep_init (void)
-{
- extern struct msginfo msginfo;
- extern struct seminfo seminfo;
-
- msleep_glob_evt = CreateEvent (NULL, TRUE, FALSE, NULL);
- if (!msleep_glob_evt)
- panic ("CreateEvent in msleep_init failed: %E");
- long msgmni = support_msgqueues ? msginfo.msgmni : 0;
- long semmni = support_semaphores ? seminfo.semmni : 0;
- TUNABLE_INT_FETCH ("kern.ipc.msgmni", &msgmni);
- TUNABLE_INT_FETCH ("kern.ipc.semmni", &semmni);
- debug ("Try allocating msgmni (%d) + semmni (%d) msleep records",
- msgmni, semmni);
- msleep_sync = new msleep_sync_array (msgmni + semmni);
- if (!msleep_sync)
- panic ("Allocating msleep records in msleep_init failed: %d", errno);
-}
-
-int
-_msleep (void *ident, struct mtx *mtx, int priority,
- const char *wmesg, int timo, struct thread *td)
-{
- int ret = -1;
-
- HANDLE evt = msleep_sync->enter (ident);
-
- if (mtx)
- mtx_unlock (mtx);
- int old_priority = set_priority (priority);
- HANDLE obj[4] =
- {
- evt,
- msleep_glob_evt,
- td->client->handle (),
- td->client->signal_arrived ()
- };
- /* PCATCH handling. If PCATCH is given and signal_arrived is a valid
- handle, then it's used in the WaitFor call and EINTR is returned. */
- int obj_cnt = 3;
- if ((priority & PCATCH)
- && td->client->signal_arrived () != INVALID_HANDLE_VALUE)
- obj_cnt = 4;
- switch (WaitForMultipleObjects (obj_cnt, obj, FALSE, timo ?: INFINITE))
- {
- case WAIT_OBJECT_0: /* wakeup() has been called. */
- ret = 0;
- debug ("msleep wakeup called for %d", td->td_proc->winpid);
- break;
- case WAIT_OBJECT_0 + 1: /* Shutdown event (triggered by wakeup_all). */
- priority |= PDROP;
- /*FALLTHRU*/
- case WAIT_OBJECT_0 + 2: /* The dependent process has exited. */
- debug ("msleep process exit or shutdown for %d", td->td_proc->winpid);
- ret = EIDRM;
- break;
- case WAIT_OBJECT_0 + 3: /* Signal for calling process arrived. */
- debug ("msleep process got signal for %d", td->td_proc->winpid);
- ret = EINTR;
- break;
- case WAIT_TIMEOUT:
- ret = EWOULDBLOCK;
- break;
- default:
- /* There's a chance that a process has been terminated before
- WaitForMultipleObjects has been called. In this case the handles
- might be invalid. The error code returned is ERROR_INVALID_HANDLE.
- Since we can trust the values of these handles otherwise, we
- treat an ERROR_INVALID_HANDLE as a normal process termination and
- hope for the best. */
- if (GetLastError () != ERROR_INVALID_HANDLE)
- panic ("wait in msleep (%s) failed, %E", wmesg);
- debug ("wait in msleep (%s) failed for %d, %E", wmesg,
- td->td_proc->winpid);
- ret = EIDRM;
- break;
- }
-
- msleep_sync->leave (ident);
-
- set_priority (old_priority);
-
- if (mtx && !(priority & PDROP))
- mtx_lock (mtx);
- return ret;
-}
-
-/*
- * Make all threads sleeping on the specified identifier runnable.
- */
-int
-wakeup (void *ident)
-{
- msleep_sync->wakeup (ident);
- return 0;
-}
-
-/*
- * Wakeup all sleeping threads. Only called in the context of cygserver
- * shutdown.
- */
-void
-wakeup_all (void)
-{
- SetEvent (msleep_glob_evt);
-}
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/bsd_mutex.h b/winsup/cygserver/bsd_mutex.h
deleted file mode 100644
index c9f5015..0000000
--- a/winsup/cygserver/bsd_mutex.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* bsd_mutex.h: BSD Mutex helper
-
- Copyright 2003, 2005 Red Hat, Inc.
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-#ifndef _BSD_MUTEX_H
-#define _BSD_MUTEX_H
-
-#define MTX_DEF 0
-
-#define MA_OWNED 1
-#define MA_NOTOWNED 2
-
-#define PZERO (0x20)
-#define PRIO_MASK (0x1f)
-#define PDROP 0x1000
-#define PCATCH 0x2000
-#define PLOCK 0x3000
-
-struct mtx {
- HANDLE h;
- const char *name;
- DWORD owner;
- unsigned long cnt;
-};
-
-/* Some BSD kernel global mutex. */
-extern struct mtx Giant;
-
-void mtx_init (mtx *, const char *, const void *, int);
-void _mtx_lock (mtx *, DWORD winpid, const char *, int);
-#define mtx_lock(m) _mtx_lock((m), (td->ipcblk->winpid), __FILE__, __LINE__)
-int mtx_owned (mtx *, DWORD);
-void _mtx_assert(mtx *, int, DWORD winpid, const char *, int);
-#define mtx_assert(m,w,p) _mtx_assert((m),(w),(p),__FILE__,__LINE__)
-void _mtx_unlock (mtx *, const char *, int);
-#define mtx_unlock(m) _mtx_unlock((m),__FILE__,__LINE__)
-
-void mtx_destroy (mtx *);
-
-void msleep_init (void);
-int _msleep (void *, struct mtx *, int, const char *, int, struct thread *);
-#define msleep(i,m,p,w,t) _msleep((i),(m),(p),(w),(t),(td))
-#define tsleep(i,p,w,t) _msleep((i),NULL,(p),(w),(t),(td))
-int wakeup (void *);
-void wakeup_all (void);
-
-#endif /* _BSD_MUTEX_H */
diff --git a/winsup/cygserver/client.cc b/winsup/cygserver/client.cc
deleted file mode 100644
index 953e5a1..0000000
--- a/winsup/cygserver/client.cc
+++ /dev/null
@@ -1,543 +0,0 @@
-/* client.cc
-
- Copyright 2001, 2002, 2003, 2004 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. */
-
-/* to allow this to link into cygwin and the .dll, a little magic is needed. */
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#else
-#include "winsup.h"
-#endif
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include "sigproc.h"
-
-#include "cygserver_msg.h"
-#include "cygserver_sem.h"
-#include "cygserver_shm.h"
-
-#include "cygserver.h"
-#include "transport.h"
-
-int cygserver_running = CYGSERVER_UNKNOWN; // Nb: inherited by children.
-
-bool allow_server = false; // Nb: inherited by children.
-
-client_request_get_version::client_request_get_version ()
- : client_request (CYGSERVER_REQUEST_GET_VERSION, &version, sizeof (version))
-{
- msglen (0); // No parameters for request.
-
- // verbose: syscall_printf ("created");
-}
-
-/*
- * client_request_get_version::check_version ()
- *
- * The major version and API version numbers must match exactly. An
- * older than expected minor version number is accepted (as long as
- * the first numbers match, that is).
- */
-
-#ifdef __INSIDE_CYGWIN__
-
-bool
-client_request_get_version::check_version () const
-{
- const bool ok = (version.major == CYGWIN_SERVER_VERSION_MAJOR
- && version.api == CYGWIN_SERVER_VERSION_API
- && version.minor <= CYGWIN_SERVER_VERSION_MINOR);
-
- if (!ok)
- syscall_printf (("incompatible version of cygwin server: "
- "client version %d.%d.%d.%d, "
- "server version %ld.%ld.%ld.%ld"),
- CYGWIN_SERVER_VERSION_MAJOR,
- CYGWIN_SERVER_VERSION_API,
- CYGWIN_SERVER_VERSION_MINOR,
- CYGWIN_SERVER_VERSION_PATCH,
- version.major,
- version.api,
- version.minor,
- version.patch);
-
- return ok;
-}
-
-client_request_attach_tty::client_request_attach_tty (DWORD nmaster_pid,
- HANDLE nfrom_master,
- HANDLE nto_master)
- : client_request (CYGSERVER_REQUEST_ATTACH_TTY, &req, sizeof (req))
-{
- req.pid = GetCurrentProcessId ();
- req.master_pid = nmaster_pid;
- req.from_master = nfrom_master;
- req.to_master = nto_master;
-
- syscall_printf (("created: pid = %lu, master_pid = %lu, "
- "from_master = %lu, to_master = %lu"),
- req.pid, req.master_pid, req.from_master, req.to_master);
-}
-#endif /* __INSIDE_CYGWIN__ */
-
-/*
- * client_request_attach_tty::send ()
- *
- * Wraps the base method to provide error handling support. If the
- * reply contains a body but is flagged as an error, close any handles
- * that have been returned by cygserver and then discard the message
- * body, i.e. the client either sees a successful result with handles
- * or an unsuccessful result with no handles.
- */
-
-void
-client_request_attach_tty::send (transport_layer_base * const conn)
-{
- client_request::send (conn);
-
- if (msglen () && error_code ())
- {
- if (from_master ())
- CloseHandle (from_master ());
- if (to_master ())
- CloseHandle (to_master ());
- msglen (0);
- }
-}
-
-client_request::header_t::header_t (const request_code_t request_code,
- const size_t msglen)
- : msglen (msglen),
- request_code (request_code)
-{
- assert (request_code >= 0 && request_code < CYGSERVER_REQUEST_LAST);
-}
-
-// FIXME: also check write and read result for -1.
-
-void
-client_request::send (transport_layer_base * const conn)
-{
- assert (conn);
- assert (!(msglen () && !_buf)); // i.e., msglen () implies _buf
- assert (msglen () <= _buflen);
-
- {
- const ssize_t count = conn->write (&_header, sizeof (_header));
-
- if (count != sizeof (_header))
- {
- assert (errno);
- error_code (errno);
- syscall_printf (("request header write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
- count, sizeof (_header),
- errno, GetLastError ());
- return;
- }
- }
-
- if (msglen ())
- {
- const ssize_t count = conn->write (_buf, msglen ());
-
- if (count == -1 || (size_t) count != msglen ())
- {
- assert (errno);
- error_code (errno);
- syscall_printf (("request body write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
- count, msglen (),
- errno, GetLastError ());
- return;
- }
- }
-
- // verbose: syscall_printf ("request sent (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
-
- {
- const ssize_t count = conn->read (&_header, sizeof (_header));
-
- if (count != sizeof (_header))
- {
- assert (errno);
- error_code (errno);
- syscall_printf (("reply header read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
- count, sizeof (_header),
- errno, GetLastError ());
- return;
- }
- }
-
- if (msglen () && !_buf)
- {
- system_printf ("no client buffer for reply body: %ld bytes needed",
- msglen ());
- error_code (EINVAL);
- return;
- }
-
- if (msglen () > _buflen)
- {
- system_printf (("client buffer too small for reply body: "
- "have %ld bytes and need %ld"),
- _buflen, msglen ());
- error_code (EINVAL);
- return;
- }
-
- if (msglen ())
- {
- const ssize_t count = conn->read (_buf, msglen ());
-
- if (count == -1 || (size_t) count != msglen ())
- {
- assert (errno);
- error_code (errno);
- syscall_printf (("reply body read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
- count, msglen (),
- errno, GetLastError ());
- return;
- }
- }
-
- // verbose: syscall_printf ("reply received (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
-}
-
-#ifdef __OUTSIDE_CYGWIN__
-
-client_request_attach_tty::client_request_attach_tty ()
- : client_request (CYGSERVER_REQUEST_ATTACH_TTY, &req, sizeof (req))
-{
-}
-
-/*
- * client_request::handle_request ()
- *
- * A server-side method.
- *
- * This is a factory method for the client_request subclasses. It
- * reads the incoming request header and, based on its request code,
- * creates an instance of the appropriate class.
- *
- * FIXME: If the incoming packet is malformed, the server drops it on
- * the floor. Should it try and generate some sort of reply for the
- * client? As it is, the client will simply get a broken connection.
- *
- * FIXME: also check write and read result for -1.
- */
-
-/* static */ void
-client_request::handle_request (transport_layer_base *const conn,
- process_cache *const cache)
-{
- // verbose: debug_printf ("about to read");
-
- header_t header;
-
- {
- const ssize_t count = conn->read (&header, sizeof (header));
-
- if (count != sizeof (header))
- {
- syscall_printf (("request header read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
- count, sizeof (header),
- errno, GetLastError ());
- return;
- }
-
- // verbose: debug_printf ("got header (%ld)", count);
- }
-
- client_request *req = NULL;
-
- switch (header.request_code)
- {
- case CYGSERVER_REQUEST_GET_VERSION:
- req = new client_request_get_version;
- break;
- case CYGSERVER_REQUEST_SHUTDOWN:
- req = new client_request_shutdown;
- break;
- case CYGSERVER_REQUEST_ATTACH_TTY:
- req = new client_request_attach_tty;
- break;
- case CYGSERVER_REQUEST_MSG:
- req = new client_request_msg;
- break;
- case CYGSERVER_REQUEST_SEM:
- req = new client_request_sem;
- break;
- case CYGSERVER_REQUEST_SHM:
- req = new client_request_shm;
- break;
- default:
- syscall_printf ("unknown request code %d received: request ignored",
- header.request_code);
- return;
- }
-
- assert (req);
-
- req->msglen (header.msglen);
- req->handle (conn, cache);
-
- delete req;
-}
-
-/*
- * client_request::handle ()
- *
- * A server-side method.
- *
- * At this point, the header of an incoming request has been read and
- * an appropriate client_request object constructed. This method has
- * to read the request body into its buffer, if there is such a body,
- * then perform the request and send back the results to the client.
- *
- * FIXME: If the incoming packet is malformed, the server drops it on
- * the floor. Should it try and generate some sort of reply for the
- * client? As it is, the client will simply get a broken connection.
- *
- * FIXME: also check write and read result for -1.
- */
-
-void
-client_request::handle (transport_layer_base *const conn,
- process_cache *const cache)
-{
- if (msglen () && !_buf)
- {
- system_printf ("no buffer for request body: %ld bytes needed",
- msglen ());
- error_code (EINVAL);
- return;
- }
-
- if (msglen () > _buflen)
- {
- system_printf (("buffer too small for request body: "
- "have %ld bytes and need %ld"),
- _buflen, msglen ());
- error_code (EINVAL);
- return;
- }
-
- if (msglen ())
- {
- const ssize_t count = conn->read (_buf, msglen ());
-
- if (count == -1 || (size_t) count != msglen ())
- {
- assert (errno);
- error_code (errno);
- syscall_printf (("request body read failure: "
- "only %ld bytes received of %ld, "
- "error = %d(%lu)"),
- count, msglen (),
- errno, GetLastError ());
- return;
- }
- }
-
- // verbose: syscall_printf ("request received (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
-
- error_code (0); // Overwrites the _header.request_code field.
-
- /*
- * This is not allowed to fail. We must return ENOSYS at a minimum
- * to the client.
- */
- serve (conn, cache);
-
- {
- const ssize_t count = conn->write (&_header, sizeof (_header));
-
- if (count != sizeof (_header))
- {
- assert (errno);
- error_code (errno);
- syscall_printf (("reply header write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
- count, sizeof (_header),
- errno, GetLastError ());
- return;
- }
- }
-
- if (msglen ())
- {
- const ssize_t count = conn->write (_buf, msglen ());
-
- if (count == -1 || (size_t) count != msglen ())
- {
- assert (errno);
- error_code (errno);
- syscall_printf (("reply body write failure: "
- "only %ld bytes sent of %ld, "
- "error = %d(%lu)"),
- count, msglen (),
- errno, GetLastError ());
- return;
- }
- }
-
- // verbose: syscall_printf ("reply sent (%ld + %ld bytes)",
- // sizeof (_header), msglen ());
-}
-
-/* The server side implementation of make_request. Very simple. */
-int
-client_request::make_request ()
-{
- transport_layer_base *const transport = create_server_transport ();
- assert (transport);
- if (transport->connect () == -1)
- {
- if (errno)
- error_code (errno);
- else
- error_code (ENOSYS);
- delete transport;
- return -1;
- }
- send (transport);
- delete transport;
- return 0;
-}
-#endif /* __OUTSIDE_CYGWIN__ */
-
-client_request::client_request (request_code_t const id,
- void * const buf,
- size_t const buflen)
- : _header (id, buflen),
- _buf (buf),
- _buflen (buflen)
-{
- assert ((!_buf && !_buflen) || (_buf && _buflen));
-}
-
-client_request::~client_request ()
-{}
-
-#ifdef __INSIDE_CYGWIN__
-int
-client_request::make_request ()
-{
- assert (cygserver_running == CYGSERVER_UNKNOWN \
- || cygserver_running == CYGSERVER_OK \
- || cygserver_running == CYGSERVER_UNAVAIL);
-
- if (cygserver_running == CYGSERVER_UNKNOWN)
- cygserver_init ();
-
- assert (cygserver_running == CYGSERVER_OK \
- || cygserver_running == CYGSERVER_UNAVAIL);
-
- /* Don't retry every request if the server's not there */
- if (cygserver_running == CYGSERVER_UNAVAIL)
- {
- syscall_printf ("cygserver un-available");
- error_code (ENOSYS);
- return -1;
- }
-
- transport_layer_base *const transport = create_server_transport ();
-
- assert (transport);
-
- if (transport->connect () == -1)
- {
- if (errno)
- error_code (errno);
- else
- error_code (ENOSYS);
- delete transport;
- return -1;
- }
-
- // verbose: debug_printf ("connected to server %p", transport);
-
- send (transport);
-
- delete transport;
-
- return 0;
-}
-
-bool
-check_cygserver_available ()
-{
- assert (cygserver_running == CYGSERVER_UNKNOWN \
- || cygserver_running == CYGSERVER_UNAVAIL);
-
- cygserver_running = CYGSERVER_OK; // For make_request ().
-
- client_request_get_version req;
-
- /* This indicates that we failed to connect to cygserver at all but
- * that's fine as cygwin doesn't need it to be running.
- */
- if (req.make_request () == -1)
- return false;
-
- /* We connected to the server but something went wrong after that
- * (in sending the message, in cygserver itself, or in receiving the
- * reply).
- */
- if (req.error_code ())
- {
- syscall_printf ("failure in cygserver version request: %d",
- req.error_code ());
- syscall_printf ("process will continue without cygserver support");
- return false;
- }
-
- return req.check_version ();
-}
-
-void
-cygserver_init ()
-{
- if (!allow_server)
- {
- syscall_printf ("cygserver use disabled in client");
- cygserver_running = CYGSERVER_UNAVAIL;
- return;
- }
-
- assert (cygserver_running == CYGSERVER_UNKNOWN \
- || cygserver_running == CYGSERVER_OK \
- || cygserver_running == CYGSERVER_UNAVAIL);
-
- if (cygserver_running == CYGSERVER_OK)
- return;
-
- if (!check_cygserver_available ())
- cygserver_running = CYGSERVER_UNAVAIL;
-}
-#endif /* __INSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/configure b/winsup/cygserver/configure
deleted file mode 100755
index 6eb065e..0000000
--- a/winsup/cygserver/configure
+++ /dev/null
@@ -1,2163 +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:
-ac_help="$ac_help
- --enable-debugging Build a cygwin DLL which has more consistency checking for debugging"
-
-# 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=
-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
- --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" ;;
-
- -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=cygserver.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 "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
-fi
-for ac_site_file in $CONFIG_SITE; do
- if test -r "$ac_site_file"; then
- echo "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
-
-
-
-INSTALL=`cd $srcdir/../..; echo $(pwd)/install-sh -c`
-
-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.
-
-# 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:561: 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'
-
-
-
-
-
-
-
-
-# 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:647: 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:668: 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:686: 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}-
-
-
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:718: 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="${ac_tool_prefix}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 "$ac_cv_prog_CC"; then
-if test -n "$ac_tool_prefix"; then
- # 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:750: 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"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
-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
-
-else
- CC="gcc"
-fi
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:786: 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:835: 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:844: \"$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:859: 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="-gstabs+ -O2"
- else
- CFLAGS="-O2"
- fi
-else
- GCC=
- test "${CFLAGS+set}" = set || CFLAGS="-g"
-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:889: 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:921: 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:957: 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)'
-
-
-case "$with_cross_host" in
- ""|*cygwin*)
- all_host="all_host"
- install_host="install_host"
- ;;
- *)
- all_host=
- install_host=
- ;;
-esac
-
-
-
-
-# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1006: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AR"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1038: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # 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_AR="ar"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
-fi
-fi
-AR="$ac_cv_prog_AR"
-if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AR="ar"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1073: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_AS"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1105: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # 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_AS="as"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
-fi
-fi
-AS="$ac_cv_prog_AS"
-if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- AS="as"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1140: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_RANLIB"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1172: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- RANLIB="ranlib"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1207: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # 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_LD="${ac_tool_prefix}ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_LD"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "ld", so it can be a program name with args.
-set dummy ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1239: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$LD"; then
- ac_cv_prog_LD="$LD" # 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_LD="ld"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_LD" && ac_cv_prog_LD="ld"
-fi
-fi
-LD="$ac_cv_prog_LD"
-if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- LD="ld"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1274: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- ac_cv_prog_NM="$NM" # 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_NM="${ac_tool_prefix}nm"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-NM="$ac_cv_prog_NM"
-if test -n "$NM"; then
- echo "$ac_t""$NM" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_NM"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1306: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$NM"; then
- ac_cv_prog_NM="$NM" # 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_NM="nm"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="nm"
-fi
-fi
-NM="$ac_cv_prog_NM"
-if test -n "$NM"; then
- echo "$ac_t""$NM" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- NM="nm"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1341: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_DLLTOOL"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1373: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="dlltool"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
-fi
-fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
-if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- DLLTOOL="dlltool"
-fi
-fi
-
-# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1408: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ac_tool_prefix}windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-if test -z "$ac_cv_prog_WINDRES"; then
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1440: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$WINDRES"; then
- ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="windres"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
-fi
-fi
-WINDRES="$ac_cv_prog_WINDRES"
-if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-else
- WINDRES="windres"
-fi
-fi
-
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1474: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1489 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1506 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1523 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1556: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1561 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:1568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_header_alloca_h=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:1589: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1594 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:1622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_func_alloca_works=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
- # that cause trouble. Some versions do not even contain alloca or
- # contain a buggy version. If you still want to use their alloca,
- # use ar to extract alloca.o from them instead of compiling alloca.c.
- ALLOCA=alloca.${ac_objext}
- cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:1654: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1659 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "webecray" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_os_cray=yes
-else
- rm -rf conftest*
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1684: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1689 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
- break
-else
- echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:1739: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat > conftest.$ac_ext <<EOF
-#line 1747 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
- exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:1766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_stack_direction=1
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1788: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftestmake <<\EOF
-all:
- @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- SET_MAKE=
-else
- echo "$ac_t""no" 1>&6
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-# Test for builtin mem* functions.
-
-ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 1825 "configure"
-#include "confdefs.h"
-
-#include <string.h>
-void foo(char *s, int c, size_t n)
-{
- __builtin_memset(s, c, n);
-}
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- use_builtin_memset=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- use_builtin_memset=no
-fi
-rm -f conftest*
-if test $use_builtin_memset = "yes"; then
- cat >> confdefs.h <<\EOF
-#define HAVE_BUILTIN_MEMSET 1
-EOF
-
-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
-
-
-# Check whether --enable-debugging or --disable-debugging was given.
-if test "${enable_debugging+set}" = set; then
- enableval="$enable_debugging"
- case "${enableval}" in
-yes) cat >> confdefs.h <<\EOF
-#define DEBUGGING 1
-EOF
- ;;
-no) ;;
-esac
-
-fi
-
-
-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%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%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%@all_host@%$all_host%g
-s%@install_host@%$install_host%g
-s%@AR@%$AR%g
-s%@AS@%$AS%g
-s%@RANLIB@%$RANLIB%g
-s%@LD@%$LD%g
-s%@NM@%$NM%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@WINDRES@%$WINDRES%g
-s%@CPP@%$CPP%g
-s%@ALLOCA@%$ALLOCA%g
-s%@SET_MAKE@%$SET_MAKE%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/cygserver/configure.in b/winsup/cygserver/configure.in
deleted file mode 100644
index 16cbd84..0000000
--- a/winsup/cygserver/configure.in
+++ /dev/null
@@ -1,123 +0,0 @@
-dnl Autoconf configure script for Cygwin.
-dnl Copyright 2003 Red Hat, Inc.
-dnl
-dnl This file is part of Cygwin.
-dnl
-dnl This software is a copyrighted work licensed under the terms of the
-dnl Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-dnl details.
-dnl
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.12)dnl
-AC_INIT(cygserver.cc)
-
-INSTALL=`cd $srcdir/../..; echo $(pwd)/install-sh -c`
-
-AC_PROG_INSTALL
-
-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_TOOL(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="-gstabs+ -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
-
-case "$with_cross_host" in
- ""|*cygwin*)
- all_host="all_host"
- install_host="install_host"
- ;;
- *)
- all_host=
- install_host=
- ;;
-esac
-
-AC_SUBST(all_host)
-AC_SUBST(install_host)
-
-AC_CHECK_TOOL(AR, ar, ar)
-AC_CHECK_TOOL(AS, as, as)
-AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
-AC_CHECK_TOOL(LD, ld, ld)
-AC_CHECK_TOOL(NM, nm, nm)
-AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
-AC_CHECK_TOOL(WINDRES, windres, windres)
-
-AC_ALLOCA
-AC_PROG_MAKE_SET
-
-dnl check whether gcc supports __builtin_memset.
-# Test for builtin mem* functions.
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-AC_TRY_COMPILE([
-#include <string.h>
-void foo(char *s, int c, size_t n)
-{
- __builtin_memset(s, c, n);
-}
-], [ ],
-use_builtin_memset=yes, use_builtin_memset=no)
-if test $use_builtin_memset = "yes"; then
- AC_DEFINE(HAVE_BUILTIN_MEMSET)
-fi
-AC_LANG_RESTORE
-
-AC_ARG_ENABLE(debugging,
-[ --enable-debugging Build a cygwin DLL which has more consistency checking for debugging],
-[case "${enableval}" in
-yes) AC_DEFINE(DEBUGGING) ;;
-no) ;;
-esac
-])
-
-AC_OUTPUT(Makefile)
diff --git a/winsup/cygserver/cygserver-config b/winsup/cygserver/cygserver-config
deleted file mode 100755
index 54440c3..0000000
--- a/winsup/cygserver/cygserver-config
+++ /dev/null
@@ -1,209 +0,0 @@
-#!/bin/bash
-#
-# cygserver-config, Copyright 2003 Red Hat Inc.
-#
-# This file is part of the Cygwin DLL.
-
-# Directory where the config files are stored
-SYSCONFDIR=/etc
-LOCALSTATEDIR=/var
-
-progname=$0
-auto_answer=""
-
-request()
-{
- if [ "${auto_answer}" = "yes" ]
- then
- echo "$1 (yes/no) yes"
- return 0
- elif [ "${auto_answer}" = "no" ]
- then
- echo "$1 (yes/no) no"
- return 1
- fi
-
- answer=""
- while [ "X${answer}" != "Xyes" -a "X${answer}" != "Xno" ]
- do
- echo -n "$1 (yes/no) "
- read -e answer
- done
- if [ "X${answer}" = "Xyes" ]
- then
- return 0
- else
- return 1
- fi
-}
-
-# Check options
-
-while :
-do
- case $# in
- 0)
- break
- ;;
- esac
-
- option=$1
- shift
-
- case "${option}" in
- -d | --debug )
- set -x
- ;;
-
- -y | --yes )
- auto_answer=yes
- ;;
-
- -n | --no )
- auto_answer=no
- ;;
-
- *)
- echo "usage: ${progname} [OPTION]..."
- echo
- echo "This script creates an Cygserver service configuration."
- echo
- echo "Options:"
- echo " --debug -d Enable shell's debug output."
- echo " --yes -y Answer all questions with \"yes\" automatically."
- echo " --no -n Answer all questions with \"no\" automatically."
- echo
- exit 1
- ;;
-
- esac
-done
-
-# Check if running on NT
-_sys="`uname`"
-_nt=`expr "${_sys}" : "CYGWIN_NT"`
-
-# Check for running cygserver processes first.
-if ps -ef | grep -v grep | grep -q cygserver
-then
- echo
- echo "There is a cygserver already running. Nothing to do, apparently."
- echo
- exit 1
-fi
-
-# Check for ${SYSCONFDIR} directory
-if [ -e "${SYSCONFDIR}" -a ! -d "${SYSCONFDIR}" ]
-then
- echo
- echo "${SYSCONFDIR} is existant but not a directory."
- echo "Cannot create global configuration file."
- echo
- exit 1
-fi
-
-# Create it if necessary
-if [ ! -e "${SYSCONFDIR}" ]
-then
- mkdir "${SYSCONFDIR}"
- if [ ! -e "${SYSCONFDIR}" ]
- then
- echo
- echo "Creating ${SYSCONFDIR} directory failed"
- echo
- exit 1
- fi
-fi
-
-# Create /var/log if not already existing
-if [ -f ${LOCALSTATEDIR}/log ]
-then
- echo "Creating ${LOCALSTATEDIR}/log failed!"
-else
- if [ ! -d ${LOCALSTATEDIR}/log ]
- then
- mkdir -p ${LOCALSTATEDIR}/log
- fi
-fi
-
-# Check if cygserver.conf exists. If yes, ask for overwriting
-if [ -f "${SYSCONFDIR}/cygserver.conf" ]
-then
- if request "Overwrite existing ${SYSCONFDIR}/cygserver.conf file?"
- then
- rm -f "${SYSCONFDIR}/cygserver.conf"
- if [ -f "${SYSCONFDIR}/cygserver.conf" ]
- then
- echo
- echo "Can't overwrite. ${SYSCONFDIR}/cygserver.conf is write protected."
- echo
- exit 1
- fi
- fi
-fi
-
-# Create default cygserver.conf from skeleton files in /etc/defaults/etc
-if [ ! -f "${SYSCONFDIR}/cygserver.conf" ]
-then
- echo "Generating ${SYSCONFDIR}/cygserver.conf file"
- cp "${SYSCONFDIR}/defaults/etc/cygserver.conf" "${SYSCONFDIR}/cygserver.conf"
- if [ ! -f "${SYSCONFDIR}/cygserver.conf" ]
- then
- echo
- echo "Couldn't create ${SYSCONFDIR}/cygserver.conf."
- echo "Perhaps there's no default file in ${SYSCONFDIR}/defaults/etc?"
- echo "Reinstalling Cygwin might help."
- echo
- exit 1
- fi
- chmod 664 "${SYSCONFDIR}/cygserver.conf"
- chown system.544 "${SYSCONFDIR}/cygserver.conf"
-fi
-
-# On NT ask if cygserver should be installed as service
-if [ ${_nt} -gt 0 ]
-then
- # But only if it is not already installed
- if ! cygrunsrv -Q cygserver > /dev/null 2>&1
- then
- echo
- echo
- echo "Warning: The following function requires administrator privileges!"
- echo
- echo "Do you want to install cygserver as service?"
- if request "(Say \"no\" if it's already installed as service)"
- then
- if ! cygrunsrv -I cygserver -d "CYGWIN cygserver" -p /usr/sbin/cygserver
- then
- echo
- echo "Installation of cygserver as service failed. Please check the"
- echo "error messages you got. They might give a clue why it failed."
- echo
- echo "A good start is either you don't have administrator privileges"
- echo "or a missing cygrunsrv binary. Please check for both."
- echo
- exit 1
- fi
- echo
- echo "The service has been installed under LocalSystem account."
- echo "To start it, call \`net start cygserver' or \`cygrunsrv -S cygserver'."
- fi
- touch "${LOCALSTATEDIR}/log/cygserver.log"
- chown system.544 "${LOCALSTATEDIR}/log/cygserver.log"
- fi
-fi
-
-echo
-echo "Further configuration options are available by editing the configuration"
-echo "file ${SYSCONFDIR}/cygserver.conf. Please read the inline information in that"
-echo "file carefully. The best option for the start is to just leave it alone."
-echo
-echo "Please keep in mind, that a client application which wants to use"
-echo "the services provided by cygserver *must* have the environment variable"
-echo "CYGWIN set so that it contains the word \"server\". So, if you don't"
-echo "need any other special CYGWIN setting, just set it to \"server\"".
-echo
-echo "It is advisable to add this setting to the Windows system environment."
-echo
-echo "Basic Cygserver configuration finished. Have fun!"
-echo
diff --git a/winsup/cygserver/cygserver.cc b/winsup/cygserver/cygserver.cc
deleted file mode 100644
index 5cf82f3..0000000
--- a/winsup/cygserver/cygserver.cc
+++ /dev/null
@@ -1,765 +0,0 @@
-/* cygserver.cc
-
- Copyright 2001, 2002, 2003, 2004, 2005 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. */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-
-#include <sys/types.h>
-
-#include <assert.h>
-#include <errno.h>
-#include <ctype.h>
-#include <getopt.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include "cygwin_version.h"
-
-#include "cygserver.h"
-#include "process.h"
-#include "transport.h"
-
-#include "cygserver_ipc.h"
-#include "cygserver_msg.h"
-#include "cygserver_sem.h"
-
-#define DEF_CONFIG_FILE "" SYSCONFDIR "/cygserver.conf"
-
-#define SERVER_VERSION "1.12"
-
-GENERIC_MAPPING access_mapping;
-
-static bool
-setup_privileges ()
-{
- BOOL rc, ret_val;
- HANDLE hToken = NULL;
- TOKEN_PRIVILEGES sPrivileges;
-
- rc = OpenProcessToken (GetCurrentProcess () , TOKEN_ALL_ACCESS , &hToken) ;
- if (!rc)
- {
- debug ("error opening process token (%lu)", GetLastError ());
- return false;
- }
- rc = LookupPrivilegeValue (NULL, SE_DEBUG_NAME, &sPrivileges.Privileges[0].Luid);
- if (!rc)
- {
- debug ("error getting privilege luid (%lu)", GetLastError ());
- ret_val = false;
- goto out;
- }
- sPrivileges.PrivilegeCount = 1 ;
- sPrivileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED ;
- rc = AdjustTokenPrivileges (hToken, FALSE, &sPrivileges, 0, NULL, NULL) ;
- if (!rc)
- {
- debug ("error adjusting privilege level. (%lu)", GetLastError ());
- ret_val = false;
- goto out;
- }
-
- access_mapping.GenericRead = FILE_READ_DATA;
- access_mapping.GenericWrite = FILE_WRITE_DATA;
- access_mapping.GenericExecute = 0;
- access_mapping.GenericAll = FILE_READ_DATA | FILE_WRITE_DATA;
-
- ret_val = true;
-
-out:
- CloseHandle (hToken);
- return ret_val;
-}
-
-int
-check_and_dup_handle (HANDLE from_process, HANDLE to_process,
- HANDLE from_process_token,
- DWORD access,
- HANDLE from_handle,
- HANDLE *to_handle_ptr, BOOL bInheritHandle = FALSE)
-{
- HANDLE local_handle = NULL;
- int ret_val = EACCES;
-
- if (from_process != GetCurrentProcess ())
- {
- if (!DuplicateHandle (from_process, from_handle,
- GetCurrentProcess (), &local_handle,
- 0, bInheritHandle,
- DUPLICATE_SAME_ACCESS))
- {
- log (LOG_ERR, "error getting handle(%u) to server (%lu)",
- (unsigned int)from_handle, GetLastError ());
- goto out;
- }
- } else
- local_handle = from_handle;
-
- if (!wincap.has_security ())
- assert (!from_process_token);
- else
- {
- char sd_buf [1024];
- PSECURITY_DESCRIPTOR sd = (PSECURITY_DESCRIPTOR) &sd_buf;
- DWORD bytes_needed;
- PRIVILEGE_SET ps;
- DWORD ps_len = sizeof (ps);
- BOOL status;
-
- if (!GetKernelObjectSecurity (local_handle,
- (OWNER_SECURITY_INFORMATION
- | GROUP_SECURITY_INFORMATION
- | DACL_SECURITY_INFORMATION),
- sd, sizeof (sd_buf), &bytes_needed))
- {
- log (LOG_ERR, "error getting handle SD (%lu)", GetLastError ());
- goto out;
- }
-
- MapGenericMask (&access, &access_mapping);
-
- if (!AccessCheck (sd, from_process_token, access, &access_mapping,
- &ps, &ps_len, &access, &status))
- {
- log (LOG_ERR, "error checking access rights (%lu)",
- GetLastError ());
- goto out;
- }
-
- if (!status)
- {
- log (LOG_ERR, "access to object denied");
- goto out;
- }
- }
-
- if (!DuplicateHandle (from_process, from_handle,
- to_process, to_handle_ptr,
- access, bInheritHandle, 0))
- {
- log (LOG_ERR, "error getting handle to client (%lu)", GetLastError ());
- goto out;
- }
-
- debug ("Duplicated %p to %p", from_handle, *to_handle_ptr);
-
- ret_val = 0;
-
- out:
- if (local_handle && from_process != GetCurrentProcess ())
- CloseHandle (local_handle);
-
- return (ret_val);
-}
-
-/*
- * client_request_attach_tty::serve ()
- */
-
-void
-client_request_attach_tty::serve (transport_layer_base *const conn,
- process_cache *)
-{
- assert (conn);
-
- assert (!error_code ());
-
- if (!wincap.has_security ())
- {
- log (LOG_NOTICE, "operation only supported on systems with security");
- error_code (EINVAL);
- msglen (0);
- return;
- }
-
- if (msglen () != sizeof (req))
- {
- log (LOG_ERR, "bad request body length: expecting %lu bytes, got %lu",
- sizeof (req), msglen ());
- error_code (EINVAL);
- msglen (0);
- return;
- }
-
- msglen (0); // Until we fill in some fields.
-
- debug ("pid %ld:(%p,%p) -> pid %ld", req.master_pid, req.from_master,
- req.to_master, req.pid);
-
- debug ("opening process %ld", req.master_pid);
-
- const HANDLE from_process_handle =
- OpenProcess (PROCESS_DUP_HANDLE, FALSE, req.master_pid);
-
- if (!from_process_handle)
- {
- log (LOG_ERR, "error opening `from' process, error = %lu",
- GetLastError ());
- error_code (EACCES);
- return;
- }
-
- debug ("opening process %ld", req.pid);
-
- const HANDLE to_process_handle =
- OpenProcess (PROCESS_DUP_HANDLE, FALSE, req.pid);
-
- if (!to_process_handle)
- {
- log (LOG_ERR, "error opening `to' process, error = %lu",
- GetLastError ());
- CloseHandle (from_process_handle);
- error_code (EACCES);
- return;
- }
-
- debug ("Impersonating client");
- if (!conn->impersonate_client ())
- {
- CloseHandle (from_process_handle);
- CloseHandle (to_process_handle);
- error_code (EACCES);
- return;
- }
-
- HANDLE token_handle = NULL;
-
- debug ("about to open thread token");
- const DWORD rc = OpenThreadToken (GetCurrentThread (),
- TOKEN_QUERY,
- TRUE,
- &token_handle);
-
- debug ("opened thread token, rc=%lu", rc);
- if (!conn->revert_to_self ())
- {
- CloseHandle (from_process_handle);
- CloseHandle (to_process_handle);
- error_code (EACCES);
- return;
- }
-
- if (!rc)
- {
- log (LOG_ERR, "error opening thread token, error = %lu",
- GetLastError ());
- CloseHandle (from_process_handle);
- CloseHandle (to_process_handle);
- error_code (EACCES);
- return;
- }
-
- // From this point on, a reply body is returned to the client.
-
- const HANDLE from_master = req.from_master;
- const HANDLE to_master = req.to_master;
-
- req.from_master = NULL;
- req.to_master = NULL;
-
- msglen (sizeof (req));
-
- if (from_master)
- if (check_and_dup_handle (from_process_handle, to_process_handle,
- token_handle,
- GENERIC_READ,
- from_master,
- &req.from_master, TRUE) != 0)
- {
- log (LOG_ERR, "error duplicating from_master handle, error = %lu",
- GetLastError ());
- error_code (EACCES);
- }
-
- if (to_master)
- if (check_and_dup_handle (from_process_handle, to_process_handle,
- token_handle,
- GENERIC_WRITE,
- to_master,
- &req.to_master, TRUE) != 0)
- {
- log (LOG_ERR, "error duplicating to_master handle, error = %lu",
- GetLastError ());
- error_code (EACCES);
- }
-
- CloseHandle (from_process_handle);
- CloseHandle (to_process_handle);
- CloseHandle (token_handle);
-
- debug ("%lu(%lu, %lu) -> %lu(%lu,%lu)",
- req.master_pid, from_master, to_master,
- req.pid, req.from_master, req.to_master);
-
- return;
-}
-
-void
-client_request_get_version::serve (transport_layer_base *, process_cache *)
-{
- assert (!error_code ());
-
- if (msglen ())
- log (LOG_ERR, "unexpected request body ignored: %lu bytes", msglen ());
-
- msglen (sizeof (version));
-
- version.major = CYGWIN_SERVER_VERSION_MAJOR;
- version.api = CYGWIN_SERVER_VERSION_API;
- version.minor = CYGWIN_SERVER_VERSION_MINOR;
- version.patch = CYGWIN_SERVER_VERSION_PATCH;
-}
-
-class server_request : public queue_request
-{
-public:
- server_request (transport_layer_base *const conn, process_cache *const cache)
- : _conn (conn), _cache (cache)
- {}
-
- virtual ~server_request ()
- {
- delete _conn;
- }
-
- virtual void process ()
- {
- client_request::handle_request (_conn, _cache);
- }
-
-private:
- transport_layer_base *const _conn;
- process_cache *const _cache;
-};
-
-class server_submission_loop : public queue_submission_loop
-{
-public:
- server_submission_loop (threaded_queue *const queue,
- transport_layer_base *const transport,
- process_cache *const cache)
- : queue_submission_loop (queue, false),
- _transport (transport),
- _cache (cache)
- {
- assert (_transport);
- assert (_cache);
- }
-
-private:
- transport_layer_base *const _transport;
- process_cache *const _cache;
-
- virtual void request_loop ();
-};
-
-/* FIXME: this is a little ugly. What we really want is to wait on
- * two objects: one for the pipe/socket, and one for being told to
- * shutdown. Otherwise this will stay a problem (we won't actually
- * shutdown until the request _AFTER_ the shutdown request. And
- * sending ourselves a request is ugly
- */
-void
-server_submission_loop::request_loop ()
-{
- /* I'd like the accepting thread's priority to be above any "normal"
- * thread in the system to avoid overflowing the listen queue (for
- * sockets; similar issues exist for named pipes); but, for example,
- * a normal priority thread in a foregrounded process is boosted to
- * THREAD_PRIORITY_HIGHEST (AFAICT). Thus try to set the current
- * thread's priority to a level one above that. This fails on
- * win9x/ME so assume any failure in that call is due to that and
- * simply call again at one priority level lower.
- */
- if (!SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST + 1))
- if (!SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_HIGHEST))
- debug ("failed to raise accept thread priority, error = %lu",
- GetLastError ());
-
- while (_running)
- {
- bool recoverable = false;
- transport_layer_base *const conn = _transport->accept (&recoverable);
- if (!conn && !recoverable)
- {
- log (LOG_ERR, "fatal error on IPC transport: closing down");
- return;
- }
- // EINTR probably implies a shutdown request; so back off for a
- // moment to let the main thread take control, otherwise the
- // server spins here receiving EINTR repeatedly since the signal
- // handler in the main thread doesn't get a chance to be called.
- if (!conn && errno == EINTR)
- {
- if (!SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_NORMAL))
- debug ("failed to reset thread priority, error = %lu",
- GetLastError ());
-
- Sleep (0);
- if (!SetThreadPriority (GetCurrentThread (),
- THREAD_PRIORITY_HIGHEST + 1))
- if (!SetThreadPriority (GetCurrentThread (),
- THREAD_PRIORITY_HIGHEST))
- debug ("failed to raise thread priority, error = %lu",
- GetLastError ());
- }
- if (conn)
- _queue->add (new server_request (conn, _cache));
- }
-}
-
-client_request_shutdown::client_request_shutdown ()
- : client_request (CYGSERVER_REQUEST_SHUTDOWN)
-{
-}
-
-void
-client_request_shutdown::serve (transport_layer_base *, process_cache *)
-{
- assert (!error_code ());
-
- if (msglen ())
- log (LOG_ERR, "unexpected request body ignored: %lu bytes", msglen ());
-
- /* FIXME: link upwards, and then this becomes a trivial method call to
- * only shutdown _this queue_
- */
-
- kill (getpid (), SIGINT);
-
- msglen (0);
-}
-
-static sig_atomic_t shutdown_server = false;
-
-static void
-handle_signal (const int signum)
-{
- /* any signal makes us die :} */
-
- shutdown_server = true;
-}
-
-/*
- * print_usage ()
- */
-
-static void
-print_usage (const char *const pgm)
-{
- log (LOG_NOTICE, "Usage: %s [OPTIONS]\n"
-"Configuration option:\n"
-" -f, --config-file <file> Use <file> as config file. Default is\n"
-" " DEF_CONFIG_FILE "\n"
-"\n"
-"Performance options:\n"
-" -c, --cleanup-threads <num> Number of cleanup threads to use.\n"
-" -r, --request-threads <num> Number of request threads to use.\n"
-"\n"
-"Logging options:\n"
-" -d, --debug Log debug messages to stderr.\n"
-" -e, --stderr Log to stderr (default if stderr is a tty).\n"
-" -E, --no-stderr Don't log to stderr (see -y, -Y options).\n"
-" -l, --log-level <level> Verbosity of logging (1..7). Default: 6\n"
-" -y, --syslog Log to syslog (default if stderr is no tty).\n"
-" -Y, --no-syslog Don't log to syslog (See -e, -E options).\n"
-"\n"
-"Support options:\n"
-" -m, --no-sharedmem Don't start XSI Shared Memory support.\n"
-" -q, --no-msgqueues Don't start XSI Message Queue support.\n"
-" -s, --no-semaphores Don't start XSI Semaphore support.\n"
-"\n"
-"Miscellaneous:\n"
-" -S, --shutdown Shutdown the daemon.\n"
-" -h, --help Output usage information and exit.\n"
-" -v, --version Output version information and exit."
-, pgm);
-}
-
-/*
- * print_version ()
- */
-
-static void
-print_version ()
-{
- char buf[200];
- snprintf (buf, sizeof (buf), "%d.%d.%d(%d.%d/%d/%d)-(%d.%d.%d.%d) %s",
- cygwin_version.dll_major / 1000,
- cygwin_version.dll_major % 1000,
- cygwin_version.dll_minor,
- cygwin_version.api_major,
- cygwin_version.api_minor,
- cygwin_version.shared_data,
- CYGWIN_SERVER_VERSION_MAJOR,
- CYGWIN_SERVER_VERSION_API,
- CYGWIN_SERVER_VERSION_MINOR,
- CYGWIN_SERVER_VERSION_PATCH,
- cygwin_version.mount_registry,
- cygwin_version.dll_build_date);
-
- log (LOG_INFO, "(cygwin) %s\n"
- "API version %s\n"
- "Copyright 2001, 2002, 2003, 2004, 2005 Red Hat, Inc.\n"
- "Compiled on %s\n"
- "Default configuration file is %s",
- SERVER_VERSION, buf, __DATE__, DEF_CONFIG_FILE);
-}
-
-/*
- * main ()
- */
-
-int
-main (const int argc, char *argv[])
-{
- const struct option longopts[] = {
- {"cleanup-threads", required_argument, NULL, 'c'},
- {"debug", no_argument, NULL, 'd'},
- {"stderr", no_argument, NULL, 'e'},
- {"no-stderr", no_argument, NULL, 'E'},
- {"config-file", required_argument, NULL, 'f'},
- {"help", no_argument, NULL, 'h'},
- {"log-level", required_argument, NULL, 'l'},
- {"no-sharedmem", no_argument, NULL, 'm'},
- {"no-msgqueues", no_argument, NULL, 'q'},
- {"request-threads", required_argument, NULL, 'r'},
- {"no-semaphores", no_argument, NULL, 's'},
- {"shutdown", no_argument, NULL, 'S'},
- {"version", no_argument, NULL, 'v'},
- {"syslog", no_argument, NULL, 'y'},
- {"no-syslog", no_argument, NULL, 'Y'},
- {0, no_argument, NULL, 0}
- };
-
- const char opts[] = "c:deEf:hl:mqr:sSvyY";
-
- long cleanup_threads = 0;
- long request_threads = 0;
- bool shutdown = false;
- const char *config_file = DEF_CONFIG_FILE;
- bool force_config_file = false;
- tun_bool_t option_log_stderr = TUN_UNDEF;
- tun_bool_t option_log_syslog = TUN_UNDEF;
-
- char *c = NULL;
-
- /* Check if we have a terminal. If so, default to stderr logging,
- otherwise default to syslog logging. This must be done early
- to allow default logging already in option processing state. */
- openlog ("cygserver", LOG_PID, LOG_KERN);
- if (isatty (2))
- log_stderr = TUN_TRUE;
- else
- log_syslog = TUN_TRUE;
-
- int opt;
-
- opterr = 0;
- while ((opt = getopt_long (argc, argv, opts, longopts, NULL)) != EOF)
- switch (opt)
- {
- case 'c':
- c = NULL;
- cleanup_threads = strtol (optarg, &c, 10);
- if (cleanup_threads <= 0 || cleanup_threads > 16 || (c && *c))
- panic ("Number of cleanup threads must be between 1 and 16");
- break;
-
- case 'd':
- log_debug = TUN_TRUE;
- break;
-
- case 'e':
- option_log_stderr = TUN_TRUE;
- break;
-
- case 'E':
- option_log_stderr = TUN_FALSE;
- break;
-
- case 'f':
- config_file = optarg;
- force_config_file = true;
- break;
-
- case 'h':
- print_usage (getprogname ());
- return 0;
-
- case 'l':
- c = NULL;
- log_level = strtoul (optarg, &c, 10);
- if (!log_level || log_level > 7 || (c && *c))
- panic ("Log level must be between 1 and 7");
- break;
-
- case 'm':
- support_sharedmem = TUN_FALSE;
- break;
-
- case 'q':
- support_msgqueues = TUN_FALSE;
- break;
-
- case 'r':
- c = NULL;
- request_threads = strtol (optarg, &c, 10);
- if (request_threads <= 0 || request_threads > 64 || (c && *c))
- panic ("Number of request threads must be between 1 and 64");
- break;
-
- case 's':
- support_semaphores = TUN_FALSE;
- break;
-
- case 'S':
- shutdown = true;
- break;
-
- case 'v':
- print_version ();
- return 0;
-
- case 'y':
- option_log_syslog = TUN_TRUE;
- break;
-
- case 'Y':
- option_log_syslog = TUN_FALSE;
- break;
-
- case '?':
- panic ("unknown option -- %c\n"
- "Try `%s --help' for more information.", optopt, getprogname ());
- }
-
- if (optind != argc)
- panic ("Too many arguments");
-
- if (shutdown)
- {
- /* Setting `cygserver_running' stops the request code making a
- * version request, which is not much to the point.
- */
- cygserver_running = CYGSERVER_OK;
-
- client_request_shutdown req;
-
- if (req.make_request () == -1 || req.error_code ())
- panic("Shutdown request failed: %s", strerror (req.error_code ()));
-
- // FIXME: It would be nice to wait here for the daemon to exit.
-
- return 0;
- }
-
- SIGHANDLE (SIGHUP);
- SIGHANDLE (SIGINT);
- SIGHANDLE (SIGTERM);
-
- tunable_param_init (config_file, force_config_file);
-
- loginit (option_log_stderr, option_log_syslog);
-
- log (LOG_INFO, "daemon starting up");
-
- if (!cleanup_threads)
- TUNABLE_INT_FETCH ("kern.srv.cleanup_threads", &cleanup_threads);
- if (!cleanup_threads)
- cleanup_threads = 2;
-
- if (!request_threads)
- TUNABLE_INT_FETCH ("kern.srv.request_threads", &request_threads);
- if (!request_threads)
- request_threads = 10;
-
- if (support_sharedmem == TUN_UNDEF)
- TUNABLE_BOOL_FETCH ("kern.srv.sharedmem", &support_sharedmem);
- if (support_sharedmem == TUN_UNDEF)
- support_sharedmem = TUN_TRUE;
-
- if (support_msgqueues == TUN_UNDEF)
- TUNABLE_BOOL_FETCH ("kern.srv.msgqueues", &support_msgqueues);
- if (support_msgqueues == TUN_UNDEF)
- support_msgqueues = TUN_TRUE;
-
- if (support_semaphores == TUN_UNDEF)
- TUNABLE_BOOL_FETCH ("kern.srv.semaphores", &support_semaphores);
- if (support_semaphores == TUN_UNDEF)
- support_semaphores = TUN_TRUE;
-
- wincap.init ();
- if (wincap.has_security () && !setup_privileges ())
- panic ("Setting process privileges failed.");
-
- ipcinit ();
-
- /*XXXXX*/
- threaded_queue request_queue (request_threads);
-
- transport_layer_base *const transport = create_server_transport ();
- assert (transport);
-
- process_cache cache (cleanup_threads);
-
- server_submission_loop submission_loop (&request_queue, transport, &cache);
-
- request_queue.add_submission_loop (&submission_loop);
-
- if (transport->listen () == -1)
- return 1;
-
- cache.start ();
-
- request_queue.start ();
-
- log (LOG_NOTICE, "Initialization complete. Waiting for requests.");
-
- /* TODO: wait on multiple objects - the thread handle for each
- * request loop + all the process handles. This should be done by
- * querying the request_queue and the process cache for all their
- * handles, and then waiting for (say) 30 seconds. after that we
- * recreate the list of handles to wait on, and wait again. the
- * point of all this abstraction is that we can trivially server
- * both sockets and pipes simply by making a new transport, and then
- * calling request_queue.process_requests (transport2);
- */
- /* WaitForMultipleObjects abort && request_queue && process_queue && signal
- -- if signal event then retrigger it
- */
- while (!shutdown_server && request_queue.running () && cache.running ())
- {
- pause ();
- if (ipcunload ())
- {
- shutdown_server = false;
- log (LOG_WARNING, "Shutdown request received but ignored. "
- "Dependent processes still running.");
- }
- }
-
- log (LOG_INFO, "Shutdown request received - new requests will be denied");
- request_queue.stop ();
- log (LOG_INFO, "All pending requests processed");
- delete transport;
- log (LOG_INFO, "No longer accepting requests - cygwin will operate in daemonless mode");
- cache.stop ();
- log (LOG_INFO, "All outstanding process-cache activities completed");
- log (LOG_NOTICE, "Shutdown finished.");
-
- return 0;
-}
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/cygserver.conf b/winsup/cygserver/cygserver.conf
deleted file mode 100644
index 2e3bc2e..0000000
--- a/winsup/cygserver/cygserver.conf
+++ /dev/null
@@ -1,136 +0,0 @@
-# cygserver.conf, Copyright(C) 2003 Red Hat Inc.
-#
-# Contains configurable parameters for the cygserver.
-#
-# The format of this file is easy. Lines beginning with a hash `#' are
-# comments and ignored. Lines consisting of only whitespaces are ignored.
-# Any other line is a setting for cygserver.
-# A setting consists of a name/value pair, separated by whitespace.
-# Each line must only consist of one name/value pair.
-# Lines must not be longer than 1023 characters.
-#
-# Some settings can be overridden by a command line switch. If so, it's
-# mentioned below.
-#
-# Settings which are commented out will use the default values. These are
-# mentioned below, too.
-
-# kern.srv.cleanup_threads: No. of cygserver threads used for cleanup tasks.
-# Default: 2, Min: 1, Max: 16, command line option -c, --cleanup-threads
-#kern.srv.cleanup_threads 2
-
-# kern.srv.request_threads: No. of cygserver threads used to serve
-# application requests.
-# Default: 10, Min: 1, Max: 64, command line option -r, --request-threads
-#kern.srv.request_threads 10
-
-# kern.srv.msgqueues: Determines whether XSI Message Queue support should be
-# started, "yes" (or "true", "y", "t", "1") or "no" (or "false", "n", "f", "0").
-# These values are valid for all binary type options.
-# Default is "yes". Command line option -q, --no-msgqueues
-#kern.srv.msgqueues yes
-
-# kern.srv.semaphores: Determines whether XSI Semaphore support should be
-# started. Default is "yes". Command line option -s, --no-semaphores
-#kern.srv.semaphores yes
-
-# kern.srv.sharedmem: Determines whether XSI Shared Memory support should be
-# started. Default is "yes". Command line option -m, --no-sharedmem
-#kern.srv.sharedmem yes
-
-# LOGGING
-
-# kern.log.syslog: Determines whether logging should go to the syslog,
-# Default is "yes", if stderr is no tty, "no" otherwise.
-# Command line option -y, --syslog or -Y, --no-syslog.
-#kern.log.syslog no
-
-# kern.log.stderr: Determines whether logging should go to stderr,
-# Default is "yes", if stderr is a tty, "no" otherwise.
-# Command line option -e, --stderr or -E, --no-stderr.
-#kern.log.stderr no
-
-# kern.log.level: Logging level. Valid values are 1 to 7 with a bigger
-# value emitting more logging output. Default level is 6.
-# Command line option -l, --log-level.
-#kern.log.level 6
-
-# kern.log.debug: Determines whether debug output should be printed to stderr.
-# Default is "no". Command line option -d, --debug
-#kern.log.debug no
-
-# XSI message queue parameters.
-#
-# Each message is broken up and stored in segments that are msgssz bytes
-# long. For efficiency reasons, this should be a power of two. Also,
-# it doesn't make sense if it is less than 8 or greater than about 256.
-
-# kern.ipc.msgseg: Maximum no. of message queue segments hold concurrently.
-# Default: 2048, Min: 256, Max: 65535
-#kern.ipc.msgseg 2048
-
-# kern.ipc.msgssz: Size of segment in bytes. Must be a power of 2 value.
-# Default: 8, Min: 8, Max: 1024
-#kern.ipc.msgssz 8
-
-# kern.ipc.msgmnb: Maximum no. of bytes in a single message queue.
-# Default: 2048, Min: 1, Max: 65535
-#kern.ipc.msgmnb 2048
-
-# kern.ipc.msgmni: Maximum no. of message queue identifiers hold concurrently.
-# Default: 40, Min: 1, Max: 1024
-#kern.ipc.msgmni 40
-
-# kern.ipc.msgtql: Maximum no. of messages hold concurrently.
-# Default: 40, Min: 1, Max: 1024
-#kern.ipc.msgtql 40
-
-# XSI semaphore parameters
-
-# kern.ipc.semmni: Maximum no. of semaphore identifiers hold concurrently.
-# Default: 10, Min: 1, Max: 1024
-#kern.ipc.semmni 10
-
-# kern.ipc.semmns: Maximum no. of semaphores hold concurrently.
-# Default: 60, Min: 1, Max: 1024
-#kern.ipc.semmns 60
-
-# kern.ipc.semmnu: Total no. of undo structures hold by server.
-# Default: 30, Min: 1, Max: 1024
-#kern.ipc.semmnu 30
-
-# kern.ipc.semmsl: Maximum no. of semaphores per semaphore id.
-# Default: 60, Min: 1, Max: 1024
-#kern.ipc.semmsl 60
-
-# kern.ipc.semopm: Maximum no. of operations per semop call.
-# Default: 100, Min: 1, Max: 1024
-#kern.ipc.semopm 100
-
-# kern.ipc.semume: Maximum no. of undo entries per process.
-# Default: 10, Min: 1, Max: 1024
-#kern.ipc.semume 10
-
-# kern.ipc.semvmx: Maximum value of a semaphore.
-# Default: 32767, Min: 1, Max: 32767
-#kern.ipc.semvmx 32767
-
-# kern.ipc.semaem: Maximum value to adjust on process exit.
-# Default: 16384, Min: 1, Max: 32767
-#kern.ipc.semaem 16384
-
-# XSI shared memory parameters
-
-# kern.ipc.shmmaxpgs: Maximum pages available for XSI shared memory.
-# Changing shmmaxpgs immediately affects setting SHMMAX. The relation
-# between shmmaxpgs and SHMMAX is: SHMMAX = shmmaxpgs * getpagesize().
-# Default: 8192, Min: 1, Max: 32767
-#kern.ipc.shmmaxpgs 8192
-
-# kern.ipc.shmmni: Maximum number of shared memory segments, system wide.
-# Default: 192, Min: 1, Max: 32767
-#kern.ipc.shmmni 192
-
-# kern.ipc.shmseg: Maximum number of shared memory segments per process.
-# Default: 128, Min: 1, Max: 32767
-#kern.ipc.shmseg 128
diff --git a/winsup/cygserver/msg.cc b/winsup/cygserver/msg.cc
deleted file mode 100644
index 87df873..0000000
--- a/winsup/cygserver/msg.cc
+++ /dev/null
@@ -1,117 +0,0 @@
-/* msg.cc: Single unix specification IPC interface for Cygwin.
-
- Copyright 2003, 2004 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. */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-
-#include <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "cygserver.h"
-#include "process.h"
-#include "transport.h"
-
-#include "cygserver_ipc.h"
-#include "cygserver_msg.h"
-
-client_request_msg::client_request_msg ()
- : client_request (CYGSERVER_REQUEST_MSG,
- &_parameters, sizeof (_parameters))
-{
-}
-
-void
-client_request_msg::serve (transport_layer_base *const conn,
- process_cache *const cache)
-{
- if (msglen () != sizeof (_parameters.in))
- {
- syscall_printf ("bad request body length: expecting %lu bytes, got %lu",
- sizeof (_parameters), msglen ());
- error_code (EINVAL);
- msglen (0);
- return;
- }
- if (support_msgqueues == TUN_FALSE)
- {
- syscall_printf ("Message queue support not started");
- error_code (ENOSYS);
- if (_parameters.in.msgop == MSGOP_msgrcv)
- _parameters.out.rcv = -1;
- else
- _parameters.out.ret = -1;
- msglen (sizeof (_parameters.out));
- return;
- }
- process *const client = cache->process (_parameters.in.ipcblk.cygpid,
- _parameters.in.ipcblk.winpid,
- _parameters.in.ipcblk.signal_arrived);
- if (!client)
- {
- error_code (EAGAIN);
- msglen (0);
- return;
- }
- if (!conn->impersonate_client ())
- {
- client->release ();
- error_code (EACCES);
- msglen (0);
- return;
- }
- if (!adjust_identity_info (&_parameters.in.ipcblk))
- {
- client->release ();
- conn->revert_to_self ();
- error_code (EACCES);
- msglen (0);
- return;
- }
- /* Early revert_to_self since IPC code runs in kernel mode. */
- conn->revert_to_self ();
- /* sysv_msg.cc takes care of itself. */
- client->release ();
- thread td = { client, &_parameters.in.ipcblk, {-1, -1} };
- int res;
- msgop_t msgop = _parameters.in.msgop; /* Get's overwritten otherwise. */
- switch (msgop)
- {
- case MSGOP_msgctl:
- res = msgctl (&td, &_parameters.in.ctlargs);
- break;
- case MSGOP_msgget:
- res = msgget (&td, &_parameters.in.getargs);
- break;
- case MSGOP_msgrcv:
- res = msgrcv (&td, &_parameters.in.rcvargs);
- break;
- case MSGOP_msgsnd:
- res = msgsnd (&td, &_parameters.in.sndargs);
- break;
- default:
- res = ENOSYS;
- td.td_retval[0] = -1;
- break;
- }
- /* Allocated by the call to adjust_identity_info(). */
- if (_parameters.in.ipcblk.gidlist)
- free (_parameters.in.ipcblk.gidlist);
- error_code (res);
- if (msgop == MSGOP_msgrcv)
- _parameters.out.rcv = td.td_retval[0];
- else
- _parameters.out.ret = td.td_retval[0];
- msglen (sizeof (_parameters.out));
-}
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/process.cc b/winsup/cygserver/process.cc
deleted file mode 100644
index eb7e094..0000000
--- a/winsup/cygserver/process.cc
+++ /dev/null
@@ -1,442 +0,0 @@
-/* process.cc
-
- Copyright 2001, 2002, 2003, 2004, 2005 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.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. */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-
-#include <sys/types.h>
-
-#include <assert.h>
-#include <stdlib.h>
-
-#include "process.h"
-
-/*****************************************************************************/
-
-#define elements(ARRAY) (sizeof (ARRAY) / sizeof (*ARRAY))
-
-/*****************************************************************************/
-
-process_cleanup::~process_cleanup ()
-{
- delete _process;
-}
-
-void
-process_cleanup::process ()
-{
- _process->cleanup ();
-}
-
-/*****************************************************************************/
-
-process::process (const pid_t cygpid, const DWORD winpid, HANDLE signal_arrived)
- : _cygpid (cygpid),
- _winpid (winpid),
- _hProcess (NULL),
- _signal_arrived (INVALID_HANDLE_VALUE),
- _cleaning_up (false),
- _exit_status (STILL_ACTIVE),
- _routines_head (NULL),
- _next (NULL)
-{
- _hProcess = OpenProcess (PROCESS_ALL_ACCESS, FALSE, winpid);
- if (!_hProcess)
- {
- system_printf ("unable to obtain handle for new cache process %d(%lu)",
- _cygpid, _winpid);
- _hProcess = INVALID_HANDLE_VALUE;
- _exit_status = 0;
- }
- else
- debug_printf ("got handle %p for new cache process %d(%lu)",
- _hProcess, _cygpid, _winpid);
- if (!signal_arrived)
- system_printf ("signal_arrived NULL for process %d(%lu)",
- _cygpid, _winpid);
- else if (signal_arrived != INVALID_HANDLE_VALUE)
- {
- if (!DuplicateHandle (_hProcess, signal_arrived,
- GetCurrentProcess (), &_signal_arrived,
- 0, FALSE, DUPLICATE_SAME_ACCESS))
- {
- system_printf ("error getting signal_arrived to server (%lu)",
- GetLastError ());
- _signal_arrived = INVALID_HANDLE_VALUE;
- }
- }
- InitializeCriticalSection (&_access);
- debug ("initialized (%lu)", _cygpid);
-}
-
-process::~process ()
-{
- debug ("deleting (%lu)", _cygpid);
- DeleteCriticalSection (&_access);
- if (_signal_arrived && _signal_arrived != INVALID_HANDLE_VALUE)
- CloseHandle (_signal_arrived);
- CloseHandle (_hProcess);
-}
-
-/* No need to be thread-safe as this is only ever called by
- * process_cache::remove_process (). If it has to be made thread-safe
- * later on, it should not use the `access' critical section as that
- * is held by the client request handlers for an arbitrary length of
- * time, i.e. while they do whatever processing is required for a
- * client request.
- */
-DWORD
-process::check_exit_code ()
-{
- if (_hProcess && _hProcess != INVALID_HANDLE_VALUE
- && _exit_status == STILL_ACTIVE
- && !GetExitCodeProcess (_hProcess, &_exit_status))
- {
- system_printf ("failed to retrieve exit code for %d(%lu), error = %lu",
- _cygpid, _winpid, GetLastError ());
- _hProcess = INVALID_HANDLE_VALUE;
- }
- return _exit_status;
-}
-
-bool
-process::add (cleanup_routine *const entry)
-{
- assert (entry);
-
- bool res = false;
- hold ();
-
- if (!_cleaning_up)
- {
- entry->_next = _routines_head;
- _routines_head = entry;
- res = true;
- }
-
- release ();
- return res;
-}
-
-bool
-process::remove (const cleanup_routine *const entry)
-{
- assert (entry);
-
- bool res = false;
- hold ();
-
- if (!_cleaning_up)
- {
- cleanup_routine *previous = NULL;
-
- for (cleanup_routine *ptr = _routines_head;
- ptr;
- previous = ptr, ptr = ptr->_next)
- {
- if (*ptr == *entry)
- {
- if (previous)
- previous->_next = ptr->_next;
- else
- _routines_head = ptr->_next;
-
- delete ptr;
- res = true;
- break;
- }
- }
- }
-
- release ();
- return res;
-}
-
-/* This is single threaded. It's called after the process is removed
- * from the cache, but inserts may be attemped by worker threads that
- * have a pointer to it.
- */
-void
-process::cleanup ()
-{
- hold ();
- assert (!is_active ());
- assert (!_cleaning_up);
- InterlockedExchange (&_cleaning_up, true);
- cleanup_routine *entry = _routines_head;
- _routines_head = NULL;
- release ();
-
- while (entry)
- {
- cleanup_routine *const ptr = entry;
- entry = entry->_next;
- ptr->cleanup (this);
- delete ptr;
- }
-}
-
-/*****************************************************************************/
-
-void
-process_cache::submission_loop::request_loop ()
-{
- assert (this);
- assert (_cache);
- assert (_interrupt_event);
-
- while (_running)
- _cache->wait_for_processes (_interrupt_event);
-}
-
-/*****************************************************************************/
-
-process_cache::process_cache (const unsigned int initial_workers)
- : _queue (initial_workers),
- _submitter (this, &_queue), // true == interruptible
- _processes_count (0),
- _processes_head (NULL),
- _cache_add_trigger (NULL)
-{
- /* there can only be one */
- InitializeCriticalSection (&_cache_write_access);
-
- _cache_add_trigger = CreateEvent (NULL, // SECURITY_ATTRIBUTES
- FALSE, // Auto-reset
- FALSE, // Initially non-signalled
- NULL); // Anonymous
-
- if (!_cache_add_trigger)
- {
- system_printf ("failed to create cache add trigger, error = %lu",
- GetLastError ());
- abort ();
- }
-
- _queue.add_submission_loop (&_submitter);
-}
-
-process_cache::~process_cache ()
-{
- (void) CloseHandle (_cache_add_trigger);
- DeleteCriticalSection (&_cache_write_access);
-}
-
-/* This returns the process object to the caller already locked, that
- * is, with the object's `access' critical region entered. Thus the
- * caller must unlock the object when it's finished with it (via
- * process::release ()). It must then not try to access the object
- * afterwards, except by going through this routine again, as it may
- * have been deleted once it has been unlocked.
- */
-class process *
-process_cache::process (const pid_t cygpid, const DWORD winpid,
- HANDLE signal_arrived)
-{
- /* TODO: make this more granular, so a search doesn't involve the
- * write lock.
- */
- EnterCriticalSection (&_cache_write_access);
- class process *previous = NULL;
- class process *entry = find (winpid, &previous);
-
- if (!entry)
- {
- if (_processes_count + SPECIALS_COUNT >= MAXIMUM_WAIT_OBJECTS)
- {
- LeaveCriticalSection (&_cache_write_access);
- system_printf (("process limit (%d processes) reached; "
- "new connection refused for %d(%lu)"),
- MAXIMUM_WAIT_OBJECTS - SPECIALS_COUNT,
- cygpid, winpid);
- return NULL;
- }
-
- entry = new class process (cygpid, winpid, signal_arrived);
- if (!entry->is_active ())
- {
- LeaveCriticalSection (&_cache_write_access);
- delete entry;
- return NULL;
- }
-
- if (previous)
- {
- entry->_next = previous->_next;
- previous->_next = entry;
- }
- else
- {
- entry->_next = _processes_head;
- _processes_head = entry;
- }
-
- _processes_count += 1;
- SetEvent (_cache_add_trigger);
- }
-
- entry->hold (); // To be released by the caller.
- LeaveCriticalSection (&_cache_write_access);
- assert (entry);
- assert (entry->_winpid == winpid);
- return entry;
-}
-
-void
-process_cache::wait_for_processes (const HANDLE interrupt_event)
-{
- // Update `_wait_array' with handles of all current processes.
- const size_t count = sync_wait_array (interrupt_event);
-
- debug_printf ("waiting on %u objects in total (%u processes)",
- count, _processes_count);
-
- const DWORD rc = WaitForMultipleObjects (count, _wait_array,
- FALSE, INFINITE);
-
- if (rc == WAIT_FAILED)
- {
- system_printf ("could not wait on the process handles, error = %lu",
- GetLastError ());
- abort ();
- }
-
- const size_t start = rc - WAIT_OBJECT_0;
-
- if (rc < WAIT_OBJECT_0 || start > count)
- {
- system_printf (("unexpected return code %rc "
- "from WaitForMultipleObjects: "
- "expected [%u .. %u)"),
- rc, WAIT_OBJECT_0, WAIT_OBJECT_0 + count);
- abort ();
- }
-
- // Tell all the processes, from the signalled point up, the bad news.
- for (size_t index = start; index != count; index++)
- if (_process_array[index])
- check_and_remove_process (index);
-}
-
-/*
- * process_cache::sync_wait_array ()
- *
- * Fill-in the wait array with the handles that the cache needs to wait on.
- * These handles are:
- * - the process_process_param's interrupt event
- * - the process_cache's cache_add_trigger event
- * - the handle for each live process in the cache.
- *
- * Return value: the number of live handles in the array.
- */
-
-size_t
-process_cache::sync_wait_array (const HANDLE interrupt_event)
-{
- assert (this);
- assert (_cache_add_trigger && _cache_add_trigger != INVALID_HANDLE_VALUE);
- assert (interrupt_event && interrupt_event != INVALID_HANDLE_VALUE);
-
- EnterCriticalSection (&_cache_write_access);
-
- assert (_processes_count + SPECIALS_COUNT <= elements (_wait_array));
-
- size_t index = 0;
-
- for (class process *ptr = _processes_head; ptr; ptr = ptr->_next)
- {
- assert (ptr->_hProcess && ptr->_hProcess != INVALID_HANDLE_VALUE);
- assert (ptr->is_active ());
-
- _wait_array[index] = ptr->handle ();
- _process_array[index++] = ptr;
-
- assert (index <= elements (_wait_array));
- }
-
- /* Sorry for shouting, but THESE MUST BE ADDED AT THE END! */
- /* Well, not strictly `must', but it's more efficient if they are :-) */
-
- _wait_array[index] = interrupt_event;
- _process_array[index++] = NULL;
-
- _wait_array[index] = _cache_add_trigger;
- _process_array[index++] = NULL;
-
- /* Phew, back to normal volume now. */
-
- assert (index <= elements (_wait_array));
-
- LeaveCriticalSection (&_cache_write_access);
-
- return index;
-}
-
-void
-process_cache::check_and_remove_process (const size_t index)
-{
- assert (this);
- assert (index < elements (_wait_array) - SPECIALS_COUNT);
-
- class process *const process = _process_array[index];
-
- assert (process);
- assert (process->handle () == _wait_array[index]);
-
- if (process->check_exit_code () == STILL_ACTIVE)
- return;
-
- debug_printf ("process %d(%lu) has left the building ($? = %lu)",
- process->_cygpid, process->_winpid, process->_exit_status);
-
- /* Unlink the process object from the process list. */
-
- EnterCriticalSection (&_cache_write_access);
-
- class process *previous = NULL;
-
- const class process *const tmp = find (process->_winpid, &previous);
-
- assert (tmp == process);
- assert (previous ? previous->_next == process : _processes_head == process);
-
- if (previous)
- previous->_next = process->_next;
- else
- _processes_head = process->_next;
-
- _processes_count -= 1;
- LeaveCriticalSection (&_cache_write_access);
-
- /* Schedule any cleanup tasks for this process. */
- _queue.add (new process_cleanup (process));
-}
-
-class process *
-process_cache::find (const DWORD winpid, class process **previous)
-{
- if (previous)
- *previous = NULL;
-
- for (class process *ptr = _processes_head; ptr; ptr = ptr->_next)
- if (ptr->_winpid == winpid)
- return ptr;
- else if (ptr->_winpid > winpid) // The list is sorted by winpid.
- return NULL;
- else if (previous)
- *previous = ptr;
-
- return NULL;
-}
-
-/*****************************************************************************/
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/process.h b/winsup/cygserver/process.h
deleted file mode 100644
index 16a5205..0000000
--- a/winsup/cygserver/process.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* process.h
-
- Copyright 2001, 2002, 2003, 2004 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _PROCESS_H
-#define _PROCESS_H
-
-#include <assert.h>
-
-#include "threaded_queue.h"
-
-class process_cleanup : public queue_request
-{
-public:
- process_cleanup (class process *const theprocess)
- : _process (theprocess)
- {
- assert (_process);
- }
-
- virtual ~process_cleanup ();
-
- virtual void process ();
-
-private:
- class process *const _process;
-};
-
-class process;
-
-class cleanup_routine
-{
- friend class process;
-
-public:
- cleanup_routine (void *const key)
- : _key (key),
- _next (NULL)
- {}
-
- virtual ~cleanup_routine () = 0;
-
- bool operator== (const cleanup_routine &rhs) const
- {
- return _key == rhs._key;
- }
-
- void *key () const { return _key; }
-
- /* MUST BE SYNCHRONOUS */
- virtual void cleanup (class process *) = 0;
-
-private:
- void *const _key;
- cleanup_routine *_next;
-};
-
-class process_cache;
-
-#define hold() _hold(__FILE__,__LINE__)
-#define release() _release(__FILE__,__LINE__)
-
-class process
-{
- friend class process_cache;
- friend class process_cleanup;
-
-public:
- process (pid_t cygpid, DWORD winpid,
- HANDLE signal_arrived = INVALID_HANDLE_VALUE);
- ~process ();
-
- pid_t cygpid () const { return _cygpid; }
- DWORD winpid () const { return _winpid; }
- HANDLE handle () const { return _hProcess; }
- HANDLE signal_arrived () const { return _signal_arrived; }
-
- bool is_active () const { return _exit_status == STILL_ACTIVE; }
-
- void _hold (const char *file, int line) {
- _log (file, line, LOG_DEBUG, "Try hold(%lu)", _cygpid);
- EnterCriticalSection (&_access);
- _log (file, line, LOG_DEBUG, "holding (%lu)", _cygpid);
- }
- void _release (const char *file, int line) {
- _log (file, line, LOG_DEBUG, "leaving (%lu)", _cygpid);
- LeaveCriticalSection (&_access);
- }
-
- bool add (cleanup_routine *);
- bool remove (const cleanup_routine *);
-
-private:
- const pid_t _cygpid;
- const DWORD _winpid;
- HANDLE _hProcess;
- HANDLE _signal_arrived;
- long _cleaning_up;
- DWORD _exit_status; // Set in the constructor and in exit_code ().
- cleanup_routine *_routines_head;
- /* used to prevent races-on-delete */
- CRITICAL_SECTION _access;
- class process *_next;
-
- DWORD check_exit_code ();
- void cleanup ();
-};
-
-class process_cache
-{
- // Number of special (i.e., non-process) handles in _wait_array.
- // See wait_for_processes () and sync_wait_array () for details.
- enum {
- SPECIALS_COUNT = 2
- };
-
- class submission_loop : public queue_submission_loop
- {
- public:
- submission_loop (process_cache *const cache, threaded_queue *const queue)
- : queue_submission_loop (queue, true),
- _cache (cache)
- {
- assert (_cache);
- }
-
- private:
- process_cache *const _cache;
-
- virtual void request_loop ();
- };
-
- friend class submission_loop;
-
-public:
- process_cache (unsigned int initial_workers);
- ~process_cache ();
-
- class process *process (pid_t cygpid, DWORD winpid,
- HANDLE signal_arrived = INVALID_HANDLE_VALUE);
-
- bool running () const { return _queue.running (); }
-
- bool start () { return _queue.start (); }
- bool stop () { return _queue.stop (); }
-
-private:
- threaded_queue _queue;
- submission_loop _submitter;
-
- size_t _processes_count;
- class process *_processes_head; // A list sorted by winpid.
-
- // Access to the _wait_array and related fields is not thread-safe,
- // since they are used solely by wait_for_processes () and its callees.
-
- HANDLE _wait_array[MAXIMUM_WAIT_OBJECTS];
- class process *_process_array[MAXIMUM_WAIT_OBJECTS];
-
- HANDLE _cache_add_trigger; // Actually both add and remove.
- CRITICAL_SECTION _cache_write_access; // Actually both read and write access.
-
- void wait_for_processes (HANDLE interrupt);
- size_t sync_wait_array (HANDLE interrupt);
- void check_and_remove_process (const size_t index);
-
- class process *find (DWORD winpid, class process **previous = NULL);
-};
-
-#endif /* _PROCESS_H */
diff --git a/winsup/cygserver/sem.cc b/winsup/cygserver/sem.cc
deleted file mode 100644
index 37d894e..0000000
--- a/winsup/cygserver/sem.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-/* sem.cc: Single unix specification IPC interface for Cygwin.
-
- Copyright 2003, 2004 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. */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-
-#include <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "cygserver.h"
-#include "process.h"
-#include "transport.h"
-
-#include "cygserver_ipc.h"
-#include "cygserver_sem.h"
-
-client_request_sem::client_request_sem ()
- : client_request (CYGSERVER_REQUEST_SEM,
- &_parameters, sizeof (_parameters))
-{
-}
-
-void
-client_request_sem::serve (transport_layer_base *const conn,
- process_cache *const cache)
-{
- if (msglen () != sizeof (_parameters.in))
- {
- syscall_printf ("bad request body length: expecting %lu bytes, got %lu",
- sizeof (_parameters), msglen ());
- error_code (EINVAL);
- msglen (0);
- return;
- }
- if (support_semaphores == TUN_FALSE)
- {
- syscall_printf ("Semaphore support not started");
- error_code (ENOSYS);
- _parameters.out.ret = -1;
- msglen (sizeof (_parameters.out));
- return;
- }
- process *const client = cache->process (_parameters.in.ipcblk.cygpid,
- _parameters.in.ipcblk.winpid,
- _parameters.in.ipcblk.signal_arrived);
- if (!client)
- {
- error_code (EAGAIN);
- msglen (0);
- return;
- }
- if (!conn->impersonate_client ())
- {
- client->release ();
- error_code (EACCES);
- msglen (0);
- return;
- }
- if (!adjust_identity_info (&_parameters.in.ipcblk))
- {
- client->release ();
- conn->revert_to_self ();
- error_code (EACCES);
- msglen (0);
- return;
- }
- /* Early revert_to_self since IPC code runs in kernel mode. */
- conn->revert_to_self ();
- /* sysv_sem.cc takes care of itself. */
- client->release ();
- thread td = { client, &_parameters.in.ipcblk, {-1, -1} };
- int res;
- switch (_parameters.in.semop)
- {
- case SEMOP_semctl:
- res = semctl (&td, &_parameters.in.ctlargs);
- break;
- case SEMOP_semget:
- res = semget (&td, &_parameters.in.getargs);
- break;
- case SEMOP_semop:
- res = semop (&td, &_parameters.in.opargs);
- break;
- default:
- res = ENOSYS;
- td.td_retval[0] = -1;
- break;
- }
- /* Allocated by the call to adjust_identity_info(). */
- if (_parameters.in.ipcblk.gidlist)
- free (_parameters.in.ipcblk.gidlist);
- error_code (res);
- _parameters.out.ret = td.td_retval[0];
- msglen (sizeof (_parameters.out));
-}
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/shm.cc b/winsup/cygserver/shm.cc
deleted file mode 100644
index 38f2d2e..0000000
--- a/winsup/cygserver/shm.cc
+++ /dev/null
@@ -1,124 +0,0 @@
-/* shm.cc: Single unix specification IPC interface for Cygwin.
-
- Copyright 2003, 2004 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. */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-
-#include <errno.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "cygserver.h"
-#include "process.h"
-#include "transport.h"
-
-#include "cygserver_ipc.h"
-#include "cygserver_shm.h"
-
-client_request_shm::client_request_shm ()
- : client_request (CYGSERVER_REQUEST_SHM,
- &_parameters, sizeof (_parameters))
-{
-}
-
-void
-client_request_shm::serve (transport_layer_base *const conn,
- process_cache *const cache)
-{
- if (msglen () != sizeof (_parameters.in))
- {
- syscall_printf ("bad request body length: expecting %lu bytes, got %lu",
- sizeof (_parameters), msglen ());
- error_code (EINVAL);
- msglen (0);
- return;
- }
- if (support_sharedmem == TUN_FALSE)
- {
- syscall_printf ("Shared memory support not started");
- error_code (ENOSYS);
- if (_parameters.in.shmop == SHMOP_shmat)
- _parameters.out.ptr = (vm_offset_t)0;
- else
- _parameters.out.ret = -1;
- msglen (sizeof (_parameters.out));
- return;
- }
- process *const client = cache->process (_parameters.in.ipcblk.cygpid,
- _parameters.in.ipcblk.winpid,
- _parameters.in.ipcblk.signal_arrived);
- if (!client)
- {
- error_code (EAGAIN);
- msglen (0);
- return;
- }
- if (!conn->impersonate_client ())
- {
- client->release ();
- error_code (EACCES);
- msglen (0);
- return;
- }
- if (!adjust_identity_info (&_parameters.in.ipcblk))
- {
- client->release ();
- conn->revert_to_self ();
- error_code (EACCES);
- msglen (0);
- return;
- }
- /* Early revert_to_self since IPC code runs in kernel mode. */
- conn->revert_to_self ();
- /* sysv_shm.cc takes care of itself. */
- client->release ();
- thread td = { client, &_parameters.in.ipcblk, {0, 0} };
- int res;
- shmop_t shmop = _parameters.in.shmop; /* Get's overwritten otherwise. */
- switch (shmop)
- {
- case SHMOP_shmat:
- ipc_p_vmspace (td.ipcblk);
- res = shmat (&td, &_parameters.in.atargs);
- break;
- case SHMOP_shmctl:
- res = shmctl (&td, &_parameters.in.ctlargs);
- break;
- case SHMOP_shmdt:
- ipc_p_vmspace (td.ipcblk);
- res = shmdt (&td, &_parameters.in.dtargs);
- break;
- case SHMOP_shmget:
- res = shmget (&td, &_parameters.in.getargs);
- break;
- case SHMOP_shmfork:
- res = cygwin_shmfork_myhook (&td, &_parameters.in.forkargs);
- break;
- default:
- res = ENOSYS;
- td.td_retval[0] = -1;
- break;
- }
- /* Allocated by the call to adjust_identity_info(). */
- if (_parameters.in.ipcblk.gidlist)
- free (_parameters.in.ipcblk.gidlist);
- error_code (res);
- if (shmop == SHMOP_shmat)
- _parameters.out.ptr = td.td_retval[0];
- else
- _parameters.out.ret = td.td_retval[0];
- if (shmop == SHMOP_shmget)
- _parameters.out.obj = td.td_retval[1];
- msglen (sizeof (_parameters.out));
-}
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/sysv_msg.cc b/winsup/cygserver/sysv_msg.cc
deleted file mode 100644
index 90ea953..0000000
--- a/winsup/cygserver/sysv_msg.cc
+++ /dev/null
@@ -1,1210 +0,0 @@
-/*
- * Implementation of SVID messages
- *
- * Author: Daniel Boulet
- *
- * Copyright 1993 Daniel Boulet and RTMX Inc.
- *
- * This system call was implemented by Daniel Boulet under contract from RTMX.
- *
- * Redistribution and use in source forms, with and without modification,
- * are permitted provided that this entire comment appears intact.
- *
- * Redistribution in binary form may occur without any restrictions.
- * Obviously, it would be nice if you gave credit where credit is due
- * but requiring it would be too onerous.
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- */
-
-/*
- * This file is heavily changed to become part of Cygwin's cygserver.
- */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#include <sys/cdefs.h>
-#ifndef __FBSDID
-#define __FBSDID(s) const char version[] = (s)
-#endif
-__FBSDID("$FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/kern/sysv_msg.c,v 1.52 2003/11/07 04:47:14 rwatson Exp $");
-
-#define _KERNEL 1
-#define __BSD_VISIBLE 1
-#include <sys/types.h>
-#include <sys/sysproto.h>
-#include <sys/ipc.h>
-#include <sys/param.h>
-#include <sys/msg.h>
-#include <malloc.h>
-#include <errno.h>
-#include <time.h>
-#include "cygserver.h"
-#include "process.h"
-#include "cygserver_ipc.h"
-
-#ifdef __CYGWIN__
-#define MSG_DEBUG
-#endif /* __CYGWIN__ */
-
-#ifdef MSG_DEBUG
-#define DPRINTF(a) debug_printf a
-#else
-#define DPRINTF(a)
-#endif
-
-static void msg_freehdr(struct msg *msghdr);
-
-#ifndef __CYGWIN__
-int msgctl(struct thread *, struct msgctl_args *);
-int msgget(struct thread *, struct msgget_args *);
-int msgsnd(struct thread *, struct msgsnd_args *);
-int msgrcv(struct thread *, struct msgrcv_args *);
-
-static sy_call_t *msgcalls[] = {
- (sy_call_t *)msgctl, (sy_call_t *)msgget,
- (sy_call_t *)msgsnd, (sy_call_t *)msgrcv
-};
-#endif /* __CYGWIN__ */
-
-
-struct msg {
- struct msg *msg_next; /* next msg in the chain */
- long msg_type; /* type of this message */
- /* >0 -> type of this message */
- /* 0 -> free header */
- u_short msg_ts; /* size of this message */
- short msg_spot; /* location of start of msg in buffer */
-};
-
-
-#ifndef MSGSSZ
-#define MSGSSZ 8 /* Each segment must be 2^N long */
-#endif
-#ifndef MSGSEG
-#define MSGSEG 2048 /* must be less than 32767 */
-#endif
-#define MSGMAX (MSGSSZ*MSGSEG)
-#ifndef MSGMNB
-#define MSGMNB 2048 /* max # of bytes in a queue */
-#endif
-#ifndef MSGMNI
-#define MSGMNI 40
-#endif
-#ifndef MSGTQL
-#define MSGTQL 40
-#endif
-
-/*
- * Based on the configuration parameters described in an SVR2 (yes, two)
- * config(1m) man page.
- *
- * Each message is broken up and stored in segments that are msgssz bytes
- * long. For efficiency reasons, this should be a power of two. Also,
- * it doesn't make sense if it is less than 8 or greater than about 256.
- * Consequently, msginit in kern/sysv_msg.c checks that msgssz is a power of
- * two between 8 and 1024 inclusive (and panic's if it isn't).
- */
-struct msginfo msginfo = {
- MSGMAX, /* max chars in a message */
- MSGMNB, /* max chars in a queue */
- MSGMNI, /* # of message queue identifiers */
- MSGTQL, /* max messages in system */
- MSGSSZ, /* size of a message segment */
- /* (must be small power of 2 greater than 4) */
- MSGSEG /* number of message segments */
-};
-
-/*
- * macros to convert between msqid_ds's and msqid's.
- * (specific to this implementation)
- */
-#define MSQID(ix,ds) ((ix) & 0xffff | (((ds).msg_perm.seq << 16) & 0xffff0000))
-#define MSQID_IX(id) ((id) & 0xffff)
-#define MSQID_SEQ(id) (((id) >> 16) & 0xffff)
-
-/*
- * The rest of this file is specific to this particular implementation.
- */
-
-struct msgmap {
- short next; /* next segment in buffer */
- /* -1 -> available */
- /* 0..(MSGSEG-1) -> index of next segment */
-};
-
-#define MSG_LOCKED 01000 /* Is this msqid_ds locked? */
-
-static int nfree_msgmaps; /* # of free map entries */
-static short free_msgmaps; /* head of linked list of free map entries */
-static struct msg *free_msghdrs;/* list of free msg headers */
-static char *msgpool; /* MSGMAX byte long msg buffer pool */
-static struct msgmap *msgmaps; /* MSGSEG msgmap structures */
-static struct msg *msghdrs; /* MSGTQL msg headers */
-static struct msqid_ds *msqids; /* MSGMNI msqid_ds struct's */
-static struct mtx msq_mtx; /* global mutex for message queues. */
-
-#ifdef __CYGWIN__
-static struct msg_info msg_info;
-#endif /* __CYGWIN__ */
-
-void
-msginit()
-{
- int i;
-
- TUNABLE_INT_FETCH("kern.ipc.msgseg", &msginfo.msgseg);
- TUNABLE_INT_FETCH("kern.ipc.msgssz", &msginfo.msgssz);
- msginfo.msgmax = msginfo.msgseg * msginfo.msgssz;
- TUNABLE_INT_FETCH("kern.ipc.msgmnb", &msginfo.msgmnb);
- TUNABLE_INT_FETCH("kern.ipc.msgmni", &msginfo.msgmni);
- TUNABLE_INT_FETCH("kern.ipc.msgtql", &msginfo.msgtql);
-
- msgpool = (char *) sys_malloc(msginfo.msgmax, M_MSG, M_WAITOK);
- if (msgpool == NULL)
- panic("msgpool is NULL");
- msgmaps = (msgmap *) sys_malloc(sizeof(struct msgmap) * msginfo.msgseg, M_MSG, M_WAITOK);
- if (msgmaps == NULL)
- panic("msgmaps is NULL");
- msghdrs = (msg *) sys_malloc(sizeof(struct msg) * msginfo.msgtql, M_MSG, M_WAITOK);
- if (msghdrs == NULL)
- panic("msghdrs is NULL");
- msqids = (msqid_ds *) sys_malloc(sizeof(struct msqid_ds) * msginfo.msgmni, M_MSG, M_WAITOK);
- if (msqids == NULL)
- panic("msqids is NULL");
-
- /*
- * msginfo.msgssz should be a power of two for efficiency reasons.
- * It is also pretty silly if msginfo.msgssz is less than 8
- * or greater than about 256 so ...
- */
-
- i = 8;
- while (i < 1024 && i != msginfo.msgssz)
- i <<= 1;
- if (i != msginfo.msgssz) {
- DPRINTF(("msginfo.msgssz=%d (0x%x)\n", msginfo.msgssz,
- msginfo.msgssz));
- panic("msginfo.msgssz not a small power of 2");
- }
-
- if (msginfo.msgseg > 32767) {
- DPRINTF(("msginfo.msgseg=%d\n", msginfo.msgseg));
- panic("msginfo.msgseg > 32767");
- }
-
- if (msgmaps == NULL)
- panic("msgmaps is NULL");
-
- for (i = 0; i < msginfo.msgseg; i++) {
- if (i > 0)
- msgmaps[i-1].next = i;
- msgmaps[i].next = -1; /* implies entry is available */
- }
- free_msgmaps = 0;
- nfree_msgmaps = msginfo.msgseg;
-
- if (msghdrs == NULL)
- panic("msghdrs is NULL");
-
- for (i = 0; i < msginfo.msgtql; i++) {
- msghdrs[i].msg_type = 0;
- if (i > 0)
- msghdrs[i-1].msg_next = &msghdrs[i];
- msghdrs[i].msg_next = NULL;
- }
- free_msghdrs = &msghdrs[0];
-
- if (msqids == NULL)
- panic("msqids is NULL");
-
- for (i = 0; i < msginfo.msgmni; i++) {
- msqids[i].msg_qbytes = 0; /* implies entry is available */
- msqids[i].msg_perm.seq = 0; /* reset to a known value */
- msqids[i].msg_perm.mode = 0;
- }
- mtx_init(&msq_mtx, "msq", NULL, MTX_DEF);
-}
-
-int
-msgunload()
-{
- struct msqid_ds *msqptr;
- int msqid;
-
- for (msqid = 0; msqid < msginfo.msgmni; msqid++) {
- /*
- * Look for an unallocated and unlocked msqid_ds.
- * msqid_ds's can be locked by msgsnd or msgrcv while
- * they are copying the message in/out. We can't
- * re-use the entry until they release it.
- */
- msqptr = &msqids[msqid];
- if (msqptr->msg_qbytes != 0 ||
- (msqptr->msg_perm.mode & MSG_LOCKED) != 0)
- break;
- }
-#ifndef __CYGWIN__
- if (msqid != msginfo.msgmni)
- return (EBUSY);
-#endif /* __CYGWIN__ */
-
- sys_free(msgpool, M_MSG);
- sys_free(msgmaps, M_MSG);
- sys_free(msghdrs, M_MSG);
- sys_free(msqids, M_MSG);
- mtx_destroy(&msq_mtx);
- return (0);
-}
-
-
-#ifndef __CYGWIN__
-static int
-sysvmsg_modload(struct module *module, int cmd, void *arg)
-{
- int error = 0;
-
- switch (cmd) {
- case MOD_LOAD:
- msginit();
- break;
- case MOD_UNLOAD:
- error = msgunload();
- break;
- case MOD_SHUTDOWN:
- break;
- default:
- error = EINVAL;
- break;
- }
- return (error);
-}
-
-static moduledata_t sysvmsg_mod = {
- "sysvmsg",
- &sysvmsg_modload,
- NULL
-};
-
-SYSCALL_MODULE_HELPER(msgsys);
-SYSCALL_MODULE_HELPER(msgctl);
-SYSCALL_MODULE_HELPER(msgget);
-SYSCALL_MODULE_HELPER(msgsnd);
-SYSCALL_MODULE_HELPER(msgrcv);
-
-DECLARE_MODULE(sysvmsg, sysvmsg_mod,
- SI_SUB_SYSV_MSG, SI_ORDER_FIRST);
-MODULE_VERSION(sysvmsg, 1);
-
-/*
- * Entry point for all MSG calls
- *
- * MPSAFE
- */
-int
-msgsys(thread *td, struct msgsys_args *uap)
-{
- int error;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
- if (uap->which < 0 ||
- (unsigned) uap->which >= sizeof(msgcalls)/sizeof(msgcalls[0]))
- return (EINVAL);
- error = (*msgcalls[uap->which])(td, &uap->a2);
- return (error);
-}
-#endif
-
-static void
-msg_freehdr(struct msg *msghdr)
-{
- while (msghdr->msg_ts > 0) {
- short next;
- if (msghdr->msg_spot < 0 || msghdr->msg_spot >= msginfo.msgseg)
- panic("msghdr->msg_spot out of range");
- next = msgmaps[msghdr->msg_spot].next;
- msgmaps[msghdr->msg_spot].next = free_msgmaps;
- free_msgmaps = msghdr->msg_spot;
- nfree_msgmaps++;
- msghdr->msg_spot = next;
- if (msghdr->msg_ts >= msginfo.msgssz)
- msghdr->msg_ts -= msginfo.msgssz;
- else
- msghdr->msg_ts = 0;
- }
- if (msghdr->msg_spot != -1)
- panic("msghdr->msg_spot != -1");
- msghdr->msg_next = free_msghdrs;
- free_msghdrs = msghdr;
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct msgctl_args {
- int msqid;
- int cmd;
- struct msqid_ds *buf;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-msgctl(struct thread *td, struct msgctl_args *uap)
-{
- int msqid = uap->msqid;
- int cmd = uap->cmd;
- struct msqid_ds *user_msqptr = uap->buf;
- int rval, error;
- struct msqid_ds msqbuf;
- register struct msqid_ds *msqptr;
-
- DPRINTF(("call to msgctl(%d, %d, 0x%x)\n", msqid, cmd, user_msqptr));
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
-#ifdef __CYGWIN__
- if (cmd == IPC_INFO) {
- if (!msqid) {
- error = copyout(&msginfo, user_msqptr,
- sizeof(struct msginfo));
- td->td_retval[0] = error ? -1 : 0;
- return (error);
- }
- if (msqid > msginfo.msgmni)
- msqid = msginfo.msgmni;
- error = copyout(msqids, user_msqptr,
- msqid * sizeof(struct msqid_ds));
- td->td_retval[0] = error ? -1 : 0;
- return (error);
- } else if (cmd == MSG_INFO) {
- mtx_lock(&msq_mtx);
- error = copyout(&msg_info, user_msqptr,
- sizeof(struct msg_info));
- td->td_retval[0] = error ? -1 : 0;
- mtx_unlock(&msq_mtx);
- return (error);
- }
-#endif /* __CYGWIN__ */
- msqid = IPCID_TO_IX(msqid);
-
- if (msqid < 0 || msqid >= msginfo.msgmni) {
- DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
- msginfo.msgmni));
- return (EINVAL);
- }
- if (cmd == IPC_SET &&
- (error = copyin(user_msqptr, &msqbuf, sizeof(msqbuf))) != 0)
- return (error);
-
- msqptr = &msqids[msqid];
-
- mtx_lock(&msq_mtx);
- if (msqptr->msg_qbytes == 0) {
- DPRINTF(("no such msqid\n"));
- error = EINVAL;
- goto done2;
- }
- if (msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
- DPRINTF(("wrong sequence number\n"));
- error = EINVAL;
- goto done2;
- }
-
- error = 0;
- rval = 0;
-
- switch (cmd) {
-
- case IPC_RMID:
- {
- struct msg *msghdr;
- if ((error = ipcperm(td, &msqptr->msg_perm, IPC_M)))
- goto done2;
- /* Free the message headers */
- msghdr = msqptr->msg_first;
- while (msghdr != NULL) {
- struct msg *msghdr_tmp;
-
- /* Free the segments of each message */
- msqptr->msg_cbytes -= msghdr->msg_ts;
- msqptr->msg_qnum--;
- msghdr_tmp = msghdr;
- msghdr = msghdr->msg_next;
- msg_freehdr(msghdr_tmp);
- }
-
- if (msqptr->msg_cbytes != 0)
- panic("msg_cbytes is screwed up");
- if (msqptr->msg_qnum != 0)
- panic("msg_qnum is screwed up");
-
- msqptr->msg_qbytes = 0; /* Mark it as free */
-#ifdef __CYGWIN__
- msg_info.msg_ids--;
-#endif /* __CYGWIN__ */
-
- wakeup(msqptr);
- }
-
- break;
-
- case IPC_SET:
- if ((error = ipcperm(td, &msqptr->msg_perm, IPC_M)))
- goto done2;
- if (msqbuf.msg_qbytes > msqptr->msg_qbytes) {
- error = suser(td);
- if (error)
- goto done2;
- }
- if (msqbuf.msg_qbytes > (unsigned long) msginfo.msgmnb) {
- DPRINTF(("can't increase msg_qbytes beyond %d"
- "(truncating)\n", msginfo.msgmnb));
- msqbuf.msg_qbytes = msginfo.msgmnb; /* silently restrict qbytes to system limit */
- }
- if (msqbuf.msg_qbytes == 0) {
- DPRINTF(("can't reduce msg_qbytes to 0\n"));
- error = EINVAL; /* non-standard errno! */
- goto done2;
- }
- msqptr->msg_perm.uid = msqbuf.msg_perm.uid; /* change the owner */
- msqptr->msg_perm.gid = msqbuf.msg_perm.gid; /* change the owner */
- msqptr->msg_perm.mode = (msqptr->msg_perm.mode & ~0777) |
- (msqbuf.msg_perm.mode & 0777);
- msqptr->msg_qbytes = msqbuf.msg_qbytes;
- msqptr->msg_ctime = time (NULL);
- break;
-
- case IPC_STAT:
- if ((error = ipcperm(td, &msqptr->msg_perm, IPC_R))) {
- DPRINTF(("requester doesn't have read access\n"));
- goto done2;
- }
- break;
-
- default:
- DPRINTF(("invalid command %d\n", cmd));
- error = EINVAL;
- goto done2;
- }
-
- if (error == 0)
- td->td_retval[0] = rval;
-done2:
- mtx_unlock(&msq_mtx);
- if (cmd == IPC_STAT && error == 0)
- error = copyout(msqptr, user_msqptr, sizeof(struct msqid_ds));
- return(error);
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct msgget_args {
- key_t key;
- int msgflg;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-msgget(struct thread *td, struct msgget_args *uap)
-{
- int msqid, error = 0;
- key_t key = uap->key;
- unsigned msgflg = uap->msgflg;
- register struct msqid_ds *msqptr = NULL;
-
- DPRINTF(("msgget(0x%x, 0%o)\n", key, msgflg));
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
- mtx_lock(&msq_mtx);
- if (key != IPC_PRIVATE) {
- for (msqid = 0; msqid < msginfo.msgmni; msqid++) {
- msqptr = &msqids[msqid];
- if (msqptr->msg_qbytes != 0 &&
- msqptr->msg_perm.key == key)
- break;
- }
- if (msqid < msginfo.msgmni) {
- DPRINTF(("found public key\n"));
- if ((msgflg & IPC_CREAT) && (msgflg & IPC_EXCL)) {
- DPRINTF(("not exclusive\n"));
- error = EEXIST;
- goto done2;
- }
- if ((error = ipcperm(td, &msqptr->msg_perm, msgflg & 0700))) {
- DPRINTF(("requester doesn't have 0%o access\n",
- msgflg & 0700));
- goto done2;
- }
- goto found;
- }
- }
-
- DPRINTF(("need to allocate the msqid_ds\n"));
- if (key == IPC_PRIVATE || (msgflg & IPC_CREAT)) {
- for (msqid = 0; msqid < msginfo.msgmni; msqid++) {
- /*
- * Look for an unallocated and unlocked msqid_ds.
- * msqid_ds's can be locked by msgsnd or msgrcv while
- * they are copying the message in/out. We can't
- * re-use the entry until they release it.
- */
- msqptr = &msqids[msqid];
- if (msqptr->msg_qbytes == 0 &&
- (msqptr->msg_perm.mode & MSG_LOCKED) == 0)
- break;
- }
- if (msqid == msginfo.msgmni) {
- DPRINTF(("no more msqid_ds's available\n"));
- error = ENOSPC;
- goto done2;
- }
- DPRINTF(("msqid %d is available\n", msqid));
- msqptr->msg_perm.key = key;
-#ifdef __CYGWIN__
- msqptr->msg_perm.cuid = td->ipcblk->uid;
- msqptr->msg_perm.uid = td->ipcblk->uid;
- msqptr->msg_perm.cgid = td->ipcblk->gid;
- msqptr->msg_perm.gid = td->ipcblk->gid;
-#else
- msqptr->msg_perm.cuid = cred->cr_uid;
- msqptr->msg_perm.uid = cred->cr_uid;
- msqptr->msg_perm.cgid = cred->cr_gid;
- msqptr->msg_perm.gid = cred->cr_gid;
-#endif /* __CYGWIN__ */
- msqptr->msg_perm.mode = (msgflg & 0777);
- /* Make sure that the returned msqid is unique */
- msqptr->msg_perm.seq = (msqptr->msg_perm.seq + 1) & 0x7fff;
- msqptr->msg_first = NULL;
- msqptr->msg_last = NULL;
- msqptr->msg_cbytes = 0;
- msqptr->msg_qnum = 0;
- msqptr->msg_qbytes = msginfo.msgmnb;
- msqptr->msg_lspid = 0;
- msqptr->msg_lrpid = 0;
- msqptr->msg_stime = 0;
- msqptr->msg_rtime = 0;
- msqptr->msg_ctime = time (NULL);
-#ifdef __CYGWIN__
- msg_info.msg_ids++;
-#endif /* __CYGWIN__ */
- } else {
- DPRINTF(("didn't find it and wasn't asked to create it\n"));
- error = ENOENT;
- goto done2;
- }
-
-found:
- /* Construct the unique msqid */
- td->td_retval[0] = IXSEQ_TO_IPCID(msqid, msqptr->msg_perm);
-done2:
- mtx_unlock(&msq_mtx);
- return (error);
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct msgsnd_args {
- int msqid;
- const void *msgp;
- size_t msgsz;
- int msgflg;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-msgsnd(struct thread *td, struct msgsnd_args *uap)
-{
- int msqid = uap->msqid;
- const void *user_msgp = uap->msgp;
- size_t msgsz = uap->msgsz;
- int msgflg = uap->msgflg;
- int segs_needed, error = 0;
- register struct msqid_ds *msqptr;
- register struct msg *msghdr;
- short next;
-
- DPRINTF(("call to msgsnd(%d, 0x%x, %d, %d)\n", msqid, user_msgp, msgsz,
- msgflg));
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
- mtx_lock(&msq_mtx);
- msqid = IPCID_TO_IX(msqid);
-
- if (msqid < 0 || msqid >= msginfo.msgmni) {
- DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
- msginfo.msgmni));
- error = EINVAL;
- goto done2;
- }
-
- msqptr = &msqids[msqid];
- if (msqptr->msg_qbytes == 0) {
- DPRINTF(("no such message queue id\n"));
- error = EINVAL;
- goto done2;
- }
- if (msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
- DPRINTF(("wrong sequence number\n"));
- error = EINVAL;
- goto done2;
- }
-
- if ((error = ipcperm(td, &msqptr->msg_perm, IPC_W))) {
- DPRINTF(("requester doesn't have write access\n"));
- goto done2;
- }
-
- segs_needed = (msgsz + msginfo.msgssz - 1) / msginfo.msgssz;
- DPRINTF(("msgsz=%d, msgssz=%d, segs_needed=%d\n", msgsz, msginfo.msgssz,
- segs_needed));
- for (;;) {
- int need_more_resources = 0;
-
- /*
- * check msgsz
- * (inside this loop in case msg_qbytes changes while we sleep)
- */
-
- if (msgsz > msqptr->msg_qbytes) {
- DPRINTF(("msgsz > msqptr->msg_qbytes\n"));
- error = EINVAL;
- goto done2;
- }
-
- if (msqptr->msg_perm.mode & MSG_LOCKED) {
- DPRINTF(("msqid is locked\n"));
- need_more_resources = 1;
- }
- if (msgsz + msqptr->msg_cbytes > msqptr->msg_qbytes) {
- DPRINTF(("msgsz + msg_cbytes > msg_qbytes\n"));
- need_more_resources = 1;
- }
- if (segs_needed > nfree_msgmaps) {
- DPRINTF(("segs_needed > nfree_msgmaps\n"));
- need_more_resources = 1;
- }
- if (free_msghdrs == NULL) {
- DPRINTF(("no more msghdrs\n"));
- need_more_resources = 1;
- }
-
- if (need_more_resources) {
- int we_own_it;
-
- if ((msgflg & IPC_NOWAIT) != 0) {
- DPRINTF(("need more resources but caller "
- "doesn't want to wait\n"));
- error = EAGAIN;
- goto done2;
- }
-
- if ((msqptr->msg_perm.mode & MSG_LOCKED) != 0) {
- DPRINTF(("we don't own the msqid_ds\n"));
- we_own_it = 0;
- } else {
- /* Force later arrivals to wait for our
- request */
- DPRINTF(("we own the msqid_ds\n"));
- msqptr->msg_perm.mode |= MSG_LOCKED;
- we_own_it = 1;
- }
- DPRINTF(("goodnight\n"));
- error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH,
- "msgwait", 0);
- DPRINTF(("good morning, error=%d\n", error));
- if (we_own_it)
- msqptr->msg_perm.mode &= ~MSG_LOCKED;
- if (error != 0) {
- DPRINTF(("msgsnd: interrupted system call\n"));
-#ifdef __CYGWIN__
- if (error != EIDRM)
-#endif /* __CYGWIN__ */
- error = EINTR;
- goto done2;
- }
-
- /*
- * Make sure that the msq queue still exists
- */
-
- if (msqptr->msg_qbytes == 0) {
- DPRINTF(("msqid deleted\n"));
- error = EIDRM;
- goto done2;
- }
-
- } else {
- DPRINTF(("got all the resources that we need\n"));
- break;
- }
- }
-
- /*
- * We have the resources that we need.
- * Make sure!
- */
-
- if (msqptr->msg_perm.mode & MSG_LOCKED)
- panic("msg_perm.mode & MSG_LOCKED");
- if (segs_needed > nfree_msgmaps)
- panic("segs_needed > nfree_msgmaps");
- if (msgsz + msqptr->msg_cbytes > msqptr->msg_qbytes)
- panic("msgsz + msg_cbytes > msg_qbytes");
- if (free_msghdrs == NULL)
- panic("no more msghdrs");
-
- /*
- * Re-lock the msqid_ds in case we page-fault when copying in the
- * message
- */
-
- if ((msqptr->msg_perm.mode & MSG_LOCKED) != 0)
- panic("msqid_ds is already locked");
- msqptr->msg_perm.mode |= MSG_LOCKED;
-
- /*
- * Allocate a message header
- */
-
- msghdr = free_msghdrs;
- free_msghdrs = msghdr->msg_next;
- msghdr->msg_spot = -1;
- msghdr->msg_ts = msgsz;
-
- /*
- * Allocate space for the message
- */
-
- while (segs_needed > 0) {
- if (nfree_msgmaps <= 0)
- panic("not enough msgmaps");
- if (free_msgmaps == -1)
- panic("nil free_msgmaps");
- next = free_msgmaps;
- if (next <= -1)
- panic("next too low #1");
- if (next >= msginfo.msgseg)
- panic("next out of range #1");
- DPRINTF(("allocating segment %d to message\n", next));
- free_msgmaps = msgmaps[next].next;
- nfree_msgmaps--;
- msgmaps[next].next = msghdr->msg_spot;
- msghdr->msg_spot = next;
- segs_needed--;
- }
-
- /*
- * Copy in the message type
- */
-
- mtx_unlock(&msq_mtx);
- if ((error = copyin(user_msgp, &msghdr->msg_type,
- sizeof(msghdr->msg_type))) != 0) {
- mtx_lock(&msq_mtx);
- DPRINTF(("error %d copying the message type\n", error));
- msg_freehdr(msghdr);
- msqptr->msg_perm.mode &= ~MSG_LOCKED;
- wakeup(msqptr);
- goto done2;
- }
- mtx_lock(&msq_mtx);
- user_msgp = (const char *)user_msgp + sizeof(msghdr->msg_type);
-
- /*
- * Validate the message type
- */
-
- if (msghdr->msg_type < 1) {
- msg_freehdr(msghdr);
- msqptr->msg_perm.mode &= ~MSG_LOCKED;
- wakeup(msqptr);
- DPRINTF(("mtype (%d) < 1\n", msghdr->msg_type));
- error = EINVAL;
- goto done2;
- }
-
- /*
- * Copy in the message body
- */
-
- next = msghdr->msg_spot;
- while (msgsz > 0) {
- size_t tlen;
- if (msgsz > (unsigned long) msginfo.msgssz)
- tlen = msginfo.msgssz;
- else
- tlen = msgsz;
- if (next <= -1)
- panic("next too low #2");
- if (next >= msginfo.msgseg)
- panic("next out of range #2");
- mtx_unlock(&msq_mtx);
- if ((error = copyin(user_msgp, &msgpool[next * msginfo.msgssz],
- tlen)) != 0) {
- mtx_lock(&msq_mtx);
- DPRINTF(("error %d copying in message segment\n",
- error));
- msg_freehdr(msghdr);
- msqptr->msg_perm.mode &= ~MSG_LOCKED;
- wakeup(msqptr);
- goto done2;
- }
- mtx_lock(&msq_mtx);
- msgsz -= tlen;
- user_msgp = (const char *)user_msgp + tlen;
- next = msgmaps[next].next;
- }
- if (next != -1)
- panic("didn't use all the msg segments");
-
- /*
- * We've got the message. Unlock the msqid_ds.
- */
-
- msqptr->msg_perm.mode &= ~MSG_LOCKED;
-
- /*
- * Make sure that the msqid_ds is still allocated.
- */
-
- if (msqptr->msg_qbytes == 0) {
- msg_freehdr(msghdr);
- wakeup(msqptr);
- error = EIDRM;
- goto done2;
- }
-
- /*
- * Put the message into the queue
- */
-
- if (msqptr->msg_first == NULL) {
- msqptr->msg_first = msghdr;
- msqptr->msg_last = msghdr;
- } else {
- msqptr->msg_last->msg_next = msghdr;
- msqptr->msg_last = msghdr;
- }
- msqptr->msg_last->msg_next = NULL;
-
- msqptr->msg_cbytes += msghdr->msg_ts;
- msqptr->msg_qnum++;
- msqptr->msg_lspid = td->td_proc->p_pid;
- msqptr->msg_stime = time (NULL);
-
-#ifdef __CYGWIN__
- msg_info.msg_num++;
- msg_info.msg_tot += uap->msgsz;
-#endif /* __CYGWIN__ */
-
- wakeup(msqptr);
- td->td_retval[0] = 0;
-done2:
- mtx_unlock(&msq_mtx);
- return (error);
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct msgrcv_args {
- int msqid;
- void *msgp;
- size_t msgsz;
- long msgtyp;
- int msgflg;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-msgrcv(struct thread *td, struct msgrcv_args *uap)
-{
- int msqid = uap->msqid;
- void *user_msgp = uap->msgp;
- size_t msgsz = uap->msgsz;
- long msgtyp = uap->msgtyp;
- int msgflg = uap->msgflg;
- size_t len;
- register struct msqid_ds *msqptr;
- register struct msg *msghdr;
- int error = 0;
- short next;
-
- DPRINTF(("call to msgrcv(%d, 0x%x, %d, %ld, %d)\n", msqid, user_msgp,
- msgsz, msgtyp, msgflg));
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
- msqid = IPCID_TO_IX(msqid);
-
- if (msqid < 0 || msqid >= msginfo.msgmni) {
- DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
- msginfo.msgmni));
- return (EINVAL);
- }
-
- msqptr = &msqids[msqid];
- mtx_lock(&msq_mtx);
- if (msqptr->msg_qbytes == 0) {
- DPRINTF(("no such message queue id\n"));
- error = EINVAL;
- goto done2;
- }
- if (msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
- DPRINTF(("wrong sequence number\n"));
- error = EINVAL;
- goto done2;
- }
-
- if ((error = ipcperm(td, &msqptr->msg_perm, IPC_R))) {
- DPRINTF(("requester doesn't have read access\n"));
- goto done2;
- }
-
- msghdr = NULL;
- while (msghdr == NULL) {
- if (msgtyp == 0) {
- msghdr = msqptr->msg_first;
- if (msghdr != NULL) {
- if (msgsz < msghdr->msg_ts &&
- (msgflg & MSG_NOERROR) == 0) {
- DPRINTF(("first message on the queue "
- "is too big (want %d, got %d)\n",
- msgsz, msghdr->msg_ts));
- error = E2BIG;
- goto done2;
- }
- if (msqptr->msg_first == msqptr->msg_last) {
- msqptr->msg_first = NULL;
- msqptr->msg_last = NULL;
- } else {
- msqptr->msg_first = msghdr->msg_next;
- if (msqptr->msg_first == NULL)
- panic("msg_first/last screwed up #1");
- }
- }
- } else {
- struct msg *previous;
- struct msg **prev;
-
- previous = NULL;
- prev = &(msqptr->msg_first);
- while ((msghdr = *prev) != NULL) {
- /*
- * Is this message's type an exact match or is
- * this message's type less than or equal to
- * the absolute value of a negative msgtyp?
- * Note that the second half of this test can
- * NEVER be true if msgtyp is positive since
- * msg_type is always positive!
- */
-
- if (msgtyp == msghdr->msg_type ||
- msghdr->msg_type <= -msgtyp) {
- DPRINTF(("found message type %d, "
- "requested %d\n",
- msghdr->msg_type, msgtyp));
- if (msgsz < msghdr->msg_ts &&
- (msgflg & MSG_NOERROR) == 0) {
- DPRINTF(("requested message "
- "on the queue is too big "
- "(want %d, got %d)\n",
- msgsz, msghdr->msg_ts));
- error = E2BIG;
- goto done2;
- }
- *prev = msghdr->msg_next;
- if (msghdr == msqptr->msg_last) {
- if (previous == NULL) {
- if (prev !=
- &msqptr->msg_first)
- panic("msg_first/last screwed up #2");
- msqptr->msg_first =
- NULL;
- msqptr->msg_last =
- NULL;
- } else {
- if (prev ==
- &msqptr->msg_first)
- panic("msg_first/last screwed up #3");
- msqptr->msg_last =
- previous;
- }
- }
- break;
- }
- previous = msghdr;
- prev = &(msghdr->msg_next);
- }
- }
-
- /*
- * We've either extracted the msghdr for the appropriate
- * message or there isn't one.
- * If there is one then bail out of this loop.
- */
-
- if (msghdr != NULL)
- break;
-
- /*
- * Hmph! No message found. Does the user want to wait?
- */
-
- if ((msgflg & IPC_NOWAIT) != 0) {
- DPRINTF(("no appropriate message found (msgtyp=%d)\n",
- msgtyp));
- /* The SVID says to return ENOMSG. */
- error = ENOMSG;
- goto done2;
- }
-
- /*
- * Wait for something to happen
- */
-
- DPRINTF(("msgrcv: goodnight\n"));
- error = msleep(msqptr, &msq_mtx, (PZERO - 4) | PCATCH,
- "msgwait", 0);
- DPRINTF(("msgrcv: good morning (error=%d)\n", error));
-
- if (error != 0) {
- DPRINTF(("msgsnd: interrupted system call\n"));
-#ifdef __CYGWIN__
- if (error != EIDRM)
-#endif /* __CYGWIN__ */
- error = EINTR;
- goto done2;
- }
-
- /*
- * Make sure that the msq queue still exists
- */
-
- if (msqptr->msg_qbytes == 0 ||
- msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
- DPRINTF(("msqid deleted\n"));
- error = EIDRM;
- goto done2;
- }
- }
-
- /*
- * Return the message to the user.
- *
- * First, do the bookkeeping (before we risk being interrupted).
- */
-
- msqptr->msg_cbytes -= msghdr->msg_ts;
- msqptr->msg_qnum--;
- msqptr->msg_lrpid = td->td_proc->p_pid;
- msqptr->msg_rtime = time (NULL);
-
- /*
- * Make msgsz the actual amount that we'll be returning.
- * Note that this effectively truncates the message if it is too long
- * (since msgsz is never increased).
- */
-
- DPRINTF(("found a message, msgsz=%d, msg_ts=%d\n", msgsz,
- msghdr->msg_ts));
- if (msgsz > msghdr->msg_ts)
- msgsz = msghdr->msg_ts;
-
- /*
- * Return the type to the user.
- */
-
- mtx_unlock(&msq_mtx);
- error = copyout(&(msghdr->msg_type), user_msgp,
- sizeof(msghdr->msg_type));
- mtx_lock(&msq_mtx);
- if (error != 0) {
- DPRINTF(("error (%d) copying out message type\n", error));
- msg_freehdr(msghdr);
- wakeup(msqptr);
- goto done2;
- }
- user_msgp = (char *)user_msgp + sizeof(msghdr->msg_type);
-
- /*
- * Return the segments to the user
- */
-
- next = msghdr->msg_spot;
- for (len = 0; len < msgsz; len += msginfo.msgssz) {
- size_t tlen;
-
- if (msgsz - len > (unsigned long) msginfo.msgssz)
- tlen = msginfo.msgssz;
- else
- tlen = msgsz - len;
- if (next <= -1)
- panic("next too low #3");
- if (next >= msginfo.msgseg)
- panic("next out of range #3");
- mtx_unlock(&msq_mtx);
- error = copyout(&msgpool[next * msginfo.msgssz],
- user_msgp, tlen);
- mtx_lock(&msq_mtx);
- if (error != 0) {
- DPRINTF(("error (%d) copying out message segment\n",
- error));
- msg_freehdr(msghdr);
- wakeup(msqptr);
- goto done2;
- }
- user_msgp = (char *)user_msgp + tlen;
- next = msgmaps[next].next;
- }
-
- /*
- * Done, return the actual number of bytes copied out.
- */
-
-#ifdef __CYGWIN__
- msg_info.msg_num--;
- msg_info.msg_tot -= msgsz;
-#endif /* __CYGWIN__ */
-
- msg_freehdr(msghdr);
- wakeup(msqptr);
- td->td_retval[0] = msgsz;
-done2:
- mtx_unlock(&msq_mtx);
- return (error);
-}
-
-#ifndef __CYGWIN__
-static int
-sysctl_msqids(SYSCTL_HANDLER_ARGS)
-{
-
- return (SYSCTL_OUT(req, msqids,
- sizeof(struct msqid_ds) * msginfo.msgmni));
-}
-
-SYSCTL_DECL(_kern_ipc);
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RD, &msginfo.msgmnb, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RD, &msginfo.msgtql, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RDTUN, &msginfo.msgssz, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RDTUN, &msginfo.msgseg, 0, "");
-SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD,
- NULL, 0, sysctl_msqids, "", "Message queue IDs");
-#endif /* __CYGWIN__ */
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/sysv_sem.cc b/winsup/cygserver/sysv_sem.cc
deleted file mode 100644
index 477df4a..0000000
--- a/winsup/cygserver/sysv_sem.cc
+++ /dev/null
@@ -1,1385 +0,0 @@
-/*
- * Implementation of SVID semaphores
- *
- * Author: Daniel Boulet
- *
- * This software is provided ``AS IS'' without any warranties of any kind.
- */
-
-/*
- * This file is heavily changed to become part of Cygwin's cygserver.
- */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#include <sys/cygwin.h>
-#include <sys/cdefs.h>
-#ifndef __FBSDID
-#define __FBSDID(s) const char version[] = (s)
-#endif
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/sys/kern/sysv_sem.c,v 1.70 2004/05/30 20:34:58 phk Exp $");
-
-#define _KERNEL 1
-#define __BSD_VISIBLE 1
-#include <sys/types.h>
-#include <sys/ipc.h>
-
-#include <sys/param.h>
-#include <sys/sysproto.h>
-#include <sys/lock.h>
-#include <sys/sem.h>
-#include <sys/queue.h>
-#include <malloc.h>
-#include <errno.h>
-#include <time.h>
-#include "cygserver.h"
-#include "process.h"
-#include "cygserver_ipc.h"
-#include <sys/smallprint.h>
-
-#ifdef __CYGWIN__
-#define __semctl semctl
-#define __semctl_args semctl_args
-#define SEM_DEBUG
-#endif /* __CYGWIN__ */
-
-#ifdef SEM_DEBUG
-#define DPRINTF(a) debug_printf a
-#else
-#define DPRINTF(a)
-#endif
-
-static int semvalid(int semid, struct semid_ds *semaptr);
-
-static struct sem_undo *semu_alloc(struct thread *td);
-static int semundo_adjust(struct thread *td, struct sem_undo **supptr,
- int semid, int semnum, int adjval);
-static void semundo_clear(int semid, int semnum, struct thread *td);
-
-#ifndef _SYS_SYSPROTO_H_
-struct __semctl_args;
-int __semctl(struct thread *td, struct __semctl_args *uap);
-struct semget_args;
-int semget(struct thread *td, struct semget_args *uap);
-struct semop_args;
-int semop(struct thread *td, struct semop_args *uap);
-#endif
-
-#ifndef __CYGWIN__
-/* XXX casting to (sy_call_t *) is bogus, as usual. */
-static sy_call_t *semcalls[] = {
- (sy_call_t *)__semctl, (sy_call_t *)semget,
- (sy_call_t *)semop
-};
-#endif
-
-static struct mtx sem_mtx; /* semaphore global lock */
-static int semtots = 0;
-static int semtot = 0;
-static struct semid_ds *sema; /* semaphore id pool */
-static struct mtx *sema_mtx; /* semaphore id pool mutexes*/
-static struct sem *sem; /* semaphore pool */
-SLIST_HEAD(, sem_undo) semu_list; /* list of active undo structures */
-static int *semu; /* undo structure pool */
-#ifndef __CYGWIN__
-static eventhandler_tag semexit_tag;
-#endif /* __CYGWIN__ */
-
-#define SEMUNDO_MTX sem_mtx
-#define SEMUNDO_LOCK() mtx_lock(&SEMUNDO_MTX);
-#define SEMUNDO_HOOKLOCK() _mtx_lock(&SEMUNDO_MTX, p->winpid, __FILE__, __LINE__);
-#define SEMUNDO_UNLOCK() mtx_unlock(&SEMUNDO_MTX);
-#define SEMUNDO_LOCKASSERT(how,pid) mtx_assert(&SEMUNDO_MTX, (how), (pid));
-
-struct sem {
- u_short semval; /* semaphore value */
- pid_t sempid; /* pid of last operation */
- u_short semncnt; /* # awaiting semval > cval */
- u_short semzcnt; /* # awaiting semval = 0 */
-};
-
-/*
- * Undo structure (one per process)
- */
-struct undo {
- short un_adjval; /* adjust on exit values */
- short un_num; /* semaphore # */
- int un_id; /* semid */
-} un_ent[1]; /* undo entries */
-
-struct sem_undo {
- SLIST_ENTRY(sem_undo) un_next; /* ptr to next active undo structure */
-#ifdef __CYGWIN__
- DWORD un_proc; /* owner of this structure */
-#else
- struct proc *un_proc; /* owner of this structure */
-#endif
- short un_cnt; /* # of active entries */
- struct undo un_ent[1]; /* undo entries */
-};
-
-/*
- * Configuration parameters
- */
-#ifndef SEMMNI
-#define SEMMNI 10 /* # of semaphore identifiers */
-#endif
-#ifndef SEMMNS
-#define SEMMNS 60 /* # of semaphores in system */
-#endif
-#ifndef SEMUME
-#define SEMUME 10 /* max # of undo entries per process */
-#endif
-#ifndef SEMMNU
-#define SEMMNU 30 /* # of undo structures in system */
-#endif
-
-/* shouldn't need tuning */
-#ifndef SEMMAP
-#define SEMMAP 30 /* # of entries in semaphore map */
-#endif
-#ifndef SEMMSL
-#define SEMMSL SEMMNS /* max # of semaphores per id */
-#endif
-#ifndef SEMOPM
-#define SEMOPM 100 /* max # of operations per semop call */
-#endif
-
-#ifndef SEMVMX
-#define SEMVMX 32767 /* semaphore maximum value */
-#endif
-#ifndef SEMAEM
-#define SEMAEM 16384 /* adjust on exit max value */
-#endif
-
-#ifdef __CYGWIN__
-/* gcc 3.4 defines a new offsetof which is different for C++. Since this
- file is just a derived plain-C file, we need to revert to the plain-C
- definition of offsetof. */
-#ifdef offsetof
-#undef offsetof
-#endif
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif /* __CYGWIN__ */
-/*
- * Due to the way semaphore memory is allocated, we have to ensure that
- * SEMUSZ is properly aligned.
- */
-
-#define SEM_ALIGN(bytes) (((bytes) + (sizeof(long) - 1)) & ~(sizeof(long) - 1))
-
-/* actual size of an undo structure */
-#define SEMUSZ SEM_ALIGN(offsetof(struct sem_undo, un_ent[SEMUME]))
-
-/*
- * Macro to find a particular sem_undo vector
- */
-#define SEMU(ix) \
- ((struct sem_undo *)(((intptr_t)semu)+ix * seminfo.semusz))
-
-/*
- * semaphore info struct
- */
-struct seminfo seminfo = {
- SEMMNI, /* # of semaphore identifiers */
- SEMMNS, /* # of semaphores in system */
- SEMMSL, /* max # of semaphores per id */
- SEMOPM, /* max # of operations per semop call */
- SEMMNU, /* # of undo structures in system */
- SEMUME, /* max # of undo entries per process */
- SEMVMX, /* semaphore maximum value */
- SEMAEM, /* adjust on exit max value */
- SEMMAP, /* # of entries in semaphore map */
- SEMUSZ /* size in bytes of undo structure */
-};
-
-#ifndef __CYGWIN__
-SYSCTL_DECL(_kern_ipc);
-SYSCTL_INT(_kern_ipc, OID_AUTO, semmap, CTLFLAG_RW, &seminfo.semmap, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semmni, CTLFLAG_RDTUN, &seminfo.semmni, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semmns, CTLFLAG_RDTUN, &seminfo.semmns, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semmnu, CTLFLAG_RDTUN, &seminfo.semmnu, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semmsl, CTLFLAG_RW, &seminfo.semmsl, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semopm, CTLFLAG_RDTUN, &seminfo.semopm, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semume, CTLFLAG_RDTUN, &seminfo.semume, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semusz, CTLFLAG_RDTUN, &seminfo.semusz, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semvmx, CTLFLAG_RW, &seminfo.semvmx, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, semaem, CTLFLAG_RW, &seminfo.semaem, 0, "");
-SYSCTL_PROC(_kern_ipc, OID_AUTO, sema, CTLFLAG_RD,
- NULL, 0, sysctl_sema, "", "");
-#endif /* __CYGWIN__ */
-
-void
-seminit(void)
-{
- int i;
-
- TUNABLE_INT_FETCH("kern.ipc.semmap", &seminfo.semmap);
- TUNABLE_INT_FETCH("kern.ipc.semmni", &seminfo.semmni);
- TUNABLE_INT_FETCH("kern.ipc.semmns", &seminfo.semmns);
- TUNABLE_INT_FETCH("kern.ipc.semmnu", &seminfo.semmnu);
- TUNABLE_INT_FETCH("kern.ipc.semmsl", &seminfo.semmsl);
- TUNABLE_INT_FETCH("kern.ipc.semopm", &seminfo.semopm);
- TUNABLE_INT_FETCH("kern.ipc.semume", &seminfo.semume);
- TUNABLE_INT_FETCH("kern.ipc.semusz", &seminfo.semusz);
- TUNABLE_INT_FETCH("kern.ipc.semvmx", &seminfo.semvmx);
- TUNABLE_INT_FETCH("kern.ipc.semaem", &seminfo.semaem);
-
-#ifdef __CYGWIN__
- /* It's too dangerous a setting to leave it alone.
- Keep that clean here. */
- seminfo.semusz = SEM_ALIGN(offsetof(struct sem_undo,
- un_ent[seminfo.semume]));
-#endif /* __CYGWIN__ */
-
- sem = (struct sem *) sys_malloc(sizeof(struct sem) * seminfo.semmns, M_SEM, M_WAITOK);
- sema = (struct semid_ds *) sys_malloc(sizeof(struct semid_ds) * seminfo.semmni, M_SEM,
- M_WAITOK);
- sema_mtx = (struct mtx *) sys_malloc(sizeof(struct mtx) * seminfo.semmni, M_SEM,
- M_WAITOK | M_ZERO);
- semu = (int *) sys_malloc(seminfo.semmnu * seminfo.semusz, M_SEM, M_WAITOK);
-
- for (i = 0; i < seminfo.semmni; i++) {
- sema[i].sem_base = 0;
- sema[i].sem_perm.mode = 0;
- sema[i].sem_perm.seq = 0;
- }
- for (i = 0; i < seminfo.semmni; i++)
- {
- char *buf = (char *)malloc (16);
- __small_sprintf (buf, "semid[%d]", i);
- mtx_init(&sema_mtx[i], buf, NULL, MTX_DEF);
- }
- for (i = 0; i < seminfo.semmnu; i++) {
- struct sem_undo *suptr = SEMU(i);
-#ifdef __CYGWIN__
- suptr->un_proc = 0;
-#else
- suptr->un_proc = NULL;
-#endif
- }
- SLIST_INIT(&semu_list);
- mtx_init(&sem_mtx, "sem", NULL, MTX_DEF);
-#ifndef __CYGWIN__
- semexit_tag = EVENTHANDLER_REGISTER(process_exit, semexit_myhook, NULL,
- EVENTHANDLER_PRI_ANY);
-#endif /* __CYGWIN__ */
-}
-
-int
-semunload(void)
-{
-#ifndef __CYGWIN__ /* Would result in being unable to shutdown the
- server gracefully. */
- if (semtot != 0)
- return (EBUSY);
-
- EVENTHANDLER_DEREGISTER(process_exit, semexit_tag);
-#endif /* __CYGWIN__ */
- sys_free(sem, M_SEM);
- sys_free(sema, M_SEM);
- sys_free(semu, M_SEM);
- for (int i = 0; i < seminfo.semmni; i++)
- mtx_destroy(&sema_mtx[i]);
- mtx_destroy(&sem_mtx);
- return (0);
-}
-
-#ifndef __CYGWIN__
-static int
-sysvsem_modload(struct module *module, int cmd, void *arg)
-{
- int error = 0;
-
- switch (cmd) {
- case MOD_LOAD:
- seminit();
- break;
- case MOD_UNLOAD:
- error = semunload();
- break;
- case MOD_SHUTDOWN:
- break;
- default:
- error = EINVAL;
- break;
- }
- return (error);
-}
-
-static moduledata_t sysvsem_mod = {
- "sysvsem",
- &sysvsem_modload,
- NULL
-};
-
-SYSCALL_MODULE_HELPER(semsys);
-SYSCALL_MODULE_HELPER(__semctl);
-SYSCALL_MODULE_HELPER(semget);
-SYSCALL_MODULE_HELPER(semop);
-
-DECLARE_MODULE(sysvsem, sysvsem_mod,
- SI_SUB_SYSV_SEM, SI_ORDER_FIRST);
-MODULE_VERSION(sysvsem, 1);
-
-/*
- * Entry point for all SEM calls
- *
- * MPSAFE
- */
-int
-semsys(td, uap)
- struct thread *td;
- /* XXX actually varargs. */
- struct semsys_args /* {
- int which;
- int a2;
- int a3;
- int a4;
- int a5;
- } */ *uap;
-{
- int error;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
- if (uap->which < 0 ||
- uap->which >= sizeof(semcalls)/sizeof(semcalls[0]))
- return (EINVAL);
- error = (*semcalls[uap->which])(td, &uap->a2);
- return (error);
-}
-#endif /* __CYGWIN__ */
-
-/*
- * Allocate a new sem_undo structure for a process
- * (returns ptr to structure or NULL if no more room)
- */
-
-static struct sem_undo *
-semu_alloc(struct thread *td)
-{
- int i;
- struct sem_undo *suptr;
- struct sem_undo **supptr;
- int attempt;
-
- SEMUNDO_LOCKASSERT(MA_OWNED, td->td_proc->winpid);
- /*
- * Try twice to allocate something.
- * (we'll purge an empty structure after the first pass so
- * two passes are always enough)
- */
-
- for (attempt = 0; attempt < 2; attempt++) {
- /*
- * Look for a free structure.
- * Fill it in and return it if we find one.
- */
-
- for (i = 0; i < seminfo.semmnu; i++) {
- suptr = SEMU(i);
-#ifdef __CYGWIN__
- if (suptr->un_proc == 0) {
-#else
- if (suptr->un_proc == NULL) {
-#endif
- SLIST_INSERT_HEAD(&semu_list, suptr, un_next);
- suptr->un_cnt = 0;
- suptr->un_proc = td->td_proc->winpid;
- return(suptr);
- }
- }
-
- /*
- * We didn't find a free one, if this is the first attempt
- * then try to free a structure.
- */
-
- if (attempt == 0) {
- /* All the structures are in use - try to free one */
- int did_something = 0;
-
- SLIST_FOREACH_PREVPTR(suptr, supptr, &semu_list,
- un_next) {
- if (suptr->un_cnt == 0) {
-#ifdef __CYGWIN__
- suptr->un_proc = 0;
-#else
- suptr->un_proc = NULL;
-#endif
- did_something = 1;
- *supptr = SLIST_NEXT(suptr, un_next);
- break;
- }
- }
-
- /* If we didn't free anything then just give-up */
- if (!did_something)
- return(NULL);
- } else {
- /*
- * The second pass failed even though we freed
- * something after the first pass!
- * This is IMPOSSIBLE!
- */
- panic("semu_alloc - second attempt failed");
- }
- }
- return (NULL);
-}
-
-/*
- * Adjust a particular entry for a particular proc
- */
-
-static int
-semundo_adjust(struct thread *td, struct sem_undo **supptr, int semid,
- int semnum, int adjval)
-{
- struct proc *p = td->td_proc;
- struct sem_undo *suptr;
- struct undo *sunptr;
- int i;
-
- SEMUNDO_LOCKASSERT(MA_OWNED, td->td_proc->winpid);
- /* Look for and remember the sem_undo if the caller doesn't provide
- it */
-
- suptr = *supptr;
- if (suptr == NULL) {
- SLIST_FOREACH(suptr, &semu_list, un_next) {
-#ifdef __CYGWIN__
- if (suptr->un_proc == p->winpid) {
-#else
- if (suptr->un_proc == p) {
-#endif
- *supptr = suptr;
- break;
- }
- }
- if (suptr == NULL) {
- if (adjval == 0)
- return(0);
- suptr = semu_alloc(td);
- if (suptr == NULL)
- return(ENOSPC);
- *supptr = suptr;
- }
- }
-
- /*
- * Look for the requested entry and adjust it (delete if adjval becomes
- * 0).
- */
- sunptr = &suptr->un_ent[0];
- for (i = 0; i < suptr->un_cnt; i++, sunptr++) {
- if (sunptr->un_id != semid || sunptr->un_num != semnum)
- continue;
- if (adjval != 0) {
- adjval += sunptr->un_adjval;
- if (adjval > seminfo.semaem || adjval < -seminfo.semaem)
- return (ERANGE);
- }
- sunptr->un_adjval = adjval;
- if (sunptr->un_adjval == 0) {
- suptr->un_cnt--;
- if (i < suptr->un_cnt)
- suptr->un_ent[i] =
- suptr->un_ent[suptr->un_cnt];
- }
- return(0);
- }
-
- /* Didn't find the right entry - create it */
- if (adjval == 0)
- return(0);
- if (adjval > seminfo.semaem || adjval < -seminfo.semaem)
- return (ERANGE);
- if (suptr->un_cnt != seminfo.semume) {
- sunptr = &suptr->un_ent[suptr->un_cnt];
- suptr->un_cnt++;
- sunptr->un_adjval = adjval;
- sunptr->un_id = semid; sunptr->un_num = semnum;
- } else
- return(EINVAL);
- return(0);
-}
-
-static void
-semundo_clear(int semid, int semnum, struct thread *td)
-{
- struct sem_undo *suptr;
-
- SEMUNDO_LOCKASSERT(MA_OWNED, td->td_proc->winpid);
- SLIST_FOREACH(suptr, &semu_list, un_next) {
- struct undo *sunptr = &suptr->un_ent[0];
- int i = 0;
-
- while (i < suptr->un_cnt) {
- if (sunptr->un_id == semid) {
- if (semnum == -1 || sunptr->un_num == semnum) {
- suptr->un_cnt--;
- if (i < suptr->un_cnt) {
- suptr->un_ent[i] =
- suptr->un_ent[suptr->un_cnt];
- continue;
- }
- }
- if (semnum != -1)
- break;
- }
- i++, sunptr++;
- }
- }
-}
-
-static int
-semvalid(int semid, struct semid_ds *semaptr)
-{
-
- return ((semaptr->sem_perm.mode & SEM_ALLOC) == 0 ||
- semaptr->sem_perm.seq != IPCID_TO_SEQ(semid) ? EINVAL : 0);
-}
-
-/*
- * Note that the user-mode half of this passes a union, not a pointer
- */
-#ifndef _SYS_SYSPROTO_H_
-struct __semctl_args {
- int semid;
- int semnum;
- int cmd;
- union semun *arg;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-__semctl(struct thread *td, struct __semctl_args *uap)
-{
- int semid = uap->semid;
- int semnum = uap->semnum;
- int cmd = uap->cmd;
- u_short *array;
- union semun *arg = uap->arg;
- union semun real_arg;
-#ifndef __CYGWIN__
- struct ucred *cred = td->td_ucred;
-#endif
- int i, rval, error;
- struct semid_ds sbuf;
- struct semid_ds *semaptr;
- struct mtx *sema_mtxp;
- u_short usval, count;
-
- DPRINTF(("call to semctl(%d, %d, %d, 0x%x)\n",
- semid, semnum, cmd, arg));
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
- array = NULL;
-
- switch(cmd) {
-#ifdef __CYGWIN__
- case IPC_INFO:
- if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
- return (error);
- if (!semid) {
- error = copyout(&seminfo, real_arg.buf,
- sizeof(struct seminfo));
- td->td_retval[0] = error ? -1 : 0;
- return (error);
- }
- if (semid > seminfo.semmni)
- semid = seminfo.semmni;
- error = copyout(sema, real_arg.buf,
- semid * sizeof(struct semid_ds));
- td->td_retval[0] = error ? -1 : 0;
- return (error);
- case SEM_INFO:
- if (!(error = copyin(arg, &real_arg, sizeof(real_arg)))) {
- struct sem_info sem_info;
- sem_info.sem_ids = semtots;
- sem_info.sem_num = semtot;
- error = copyout(&sem_info, real_arg.buf,
- sizeof(struct sem_info));
- }
- td->td_retval[0] = error ? -1 : 0;
- return (error);
-
-#endif /* __CYGWIN__ */
- case SEM_STAT:
- if (semid < 0 || semid >= seminfo.semmni)
- return (EINVAL);
- if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
- return (error);
- semaptr = &sema[semid];
- sema_mtxp = &sema_mtx[semid];
- mtx_lock(sema_mtxp);
- if ((semaptr->sem_perm.mode & SEM_ALLOC) == 0) {
- error = EINVAL;
- goto done2;
- }
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_R)))
- goto done2;
- mtx_unlock(sema_mtxp);
- error = copyout(semaptr, real_arg.buf, sizeof(struct semid_ds));
- rval = IXSEQ_TO_IPCID(semid,semaptr->sem_perm);
- if (error == 0)
- td->td_retval[0] = rval;
- return (error);
- }
-
- semid = IPCID_TO_IX(semid);
- if (semid < 0 || semid >= seminfo.semmni)
- return (EINVAL);
-
- semaptr = &sema[semid];
- sema_mtxp = &sema_mtx[semid];
-
- error = 0;
- rval = 0;
-
- switch (cmd) {
- case IPC_RMID:
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_M)))
- goto done2;
-#ifdef __CYGWIN__
- semaptr->sem_perm.cuid = td->ipcblk->uid;
- semaptr->sem_perm.uid = td->ipcblk->uid;
-#else
- semaptr->sem_perm.cuid = cred->cr_uid;
- semaptr->sem_perm.uid = cred->cr_uid;
-#endif
- semtot -= semaptr->sem_nsems;
- semtots--;
- for (i = semaptr->sem_base - sem; i < semtot; i++)
- sem[i] = sem[i + semaptr->sem_nsems];
- for (i = 0; i < seminfo.semmni; i++) {
- if ((sema[i].sem_perm.mode & SEM_ALLOC) &&
- sema[i].sem_base > semaptr->sem_base)
- sema[i].sem_base -= semaptr->sem_nsems;
- }
- semaptr->sem_perm.mode = 0;
- SEMUNDO_LOCK();
- semundo_clear(semid, -1, td);
- SEMUNDO_UNLOCK();
- wakeup(semaptr);
- break;
-
- case IPC_SET:
- if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
- goto done2;
- if ((error = copyin(real_arg.buf, &sbuf, sizeof(sbuf))) != 0)
- goto done2;
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_M)))
- goto done2;
- semaptr->sem_perm.uid = sbuf.sem_perm.uid;
- semaptr->sem_perm.gid = sbuf.sem_perm.gid;
- semaptr->sem_perm.mode = (semaptr->sem_perm.mode & ~0777) |
- (sbuf.sem_perm.mode & 0777);
- semaptr->sem_ctime = time (NULL);
- break;
-
- case IPC_STAT:
- if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
- goto done2;
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_R)))
- goto done2;
- sbuf = *semaptr;
- mtx_unlock(sema_mtxp);
- error = copyout(semaptr, real_arg.buf,
- sizeof(struct semid_ds));
- break;
-
- case GETNCNT:
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_R)))
- goto done2;
- if (semnum < 0 || semnum >= semaptr->sem_nsems) {
- error = EINVAL;
- goto done2;
- }
- rval = semaptr->sem_base[semnum].semncnt;
- break;
-
- case GETPID:
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_R)))
- goto done2;
- if (semnum < 0 || semnum >= semaptr->sem_nsems) {
- error = EINVAL;
- goto done2;
- }
- rval = semaptr->sem_base[semnum].sempid;
- break;
-
- case GETVAL:
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_R)))
- goto done2;
- if (semnum < 0 || semnum >= semaptr->sem_nsems) {
- error = EINVAL;
- goto done2;
- }
- rval = semaptr->sem_base[semnum].semval;
- break;
-
- case GETALL:
- if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
- goto done2;
- array = (u_short *) sys_malloc(sizeof(*array) * semaptr->sem_nsems, M_TEMP,
- M_WAITOK);
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_R)))
- goto done2;
- for (i = 0; i < semaptr->sem_nsems; i++)
- array[i] = semaptr->sem_base[i].semval;
- mtx_unlock(sema_mtxp);
- error = copyout(array, real_arg.array,
- i * sizeof(real_arg.array[0]));
- break;
-
- case GETZCNT:
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_R)))
- goto done2;
- if (semnum < 0 || semnum >= semaptr->sem_nsems) {
- error = EINVAL;
- goto done2;
- }
- rval = semaptr->sem_base[semnum].semzcnt;
- break;
-
- case SETVAL:
- if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
- goto done2;
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_W)))
- goto done2;
- if (semnum < 0 || semnum >= semaptr->sem_nsems) {
- error = EINVAL;
- goto done2;
- }
- if (real_arg.val < 0 || real_arg.val > seminfo.semvmx) {
- error = ERANGE;
- goto done2;
- }
- semaptr->sem_base[semnum].semval = real_arg.val;
- SEMUNDO_LOCK();
- semundo_clear(semid, semnum, td);
- SEMUNDO_UNLOCK();
- wakeup(semaptr);
- break;
-
- case SETALL:
- mtx_lock(sema_mtxp);
-raced:
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- count = semaptr->sem_nsems;
- mtx_unlock(sema_mtxp);
- if ((error = copyin(arg, &real_arg, sizeof(real_arg))) != 0)
- goto done2;
- array = (u_short *) sys_malloc(sizeof(*array) * count, M_TEMP, M_WAITOK);
- copyin(real_arg.array, array, count * sizeof(*array));
- if (error)
- break;
- mtx_lock(sema_mtxp);
- if ((error = semvalid(uap->semid, semaptr)) != 0)
- goto done2;
- /* we could have raced? */
- if (count != semaptr->sem_nsems) {
- sys_free(array, M_TEMP);
- array = NULL;
- goto raced;
- }
- if ((error = ipcperm(td, &semaptr->sem_perm, IPC_W)))
- goto done2;
- for (i = 0; i < semaptr->sem_nsems; i++) {
- usval = array[i];
- if (usval > seminfo.semvmx) {
- error = ERANGE;
- break;
- }
- semaptr->sem_base[i].semval = usval;
- }
- SEMUNDO_LOCK();
- semundo_clear(semid, -1, td);
- SEMUNDO_UNLOCK();
- wakeup(semaptr);
- break;
-
- default:
- error = EINVAL;
- break;
- }
-
- if (error == 0)
- td->td_retval[0] = rval;
-done2:
- if (mtx_owned(sema_mtxp, td->td_proc->winpid))
- mtx_unlock(sema_mtxp);
- if (array != NULL)
- sys_free(array, M_TEMP);
- return(error);
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct semget_args {
- key_t key;
- int nsems;
- int semflg;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-semget(struct thread *td, struct semget_args *uap)
-{
- int semid, error = 0;
- key_t key = uap->key;
- int nsems = uap->nsems;
- int semflg = uap->semflg;
-#ifndef __CYGWIN__
- struct ucred *cred = td->td_ucred;
-#endif
-
- DPRINTF(("semget(0x%X, %d, 0%o)\n", key, nsems, semflg));
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
- mtx_lock(&Giant);
- if (key != IPC_PRIVATE) {
- for (semid = 0; semid < seminfo.semmni; semid++) {
- if ((sema[semid].sem_perm.mode & SEM_ALLOC) &&
- sema[semid].sem_perm.key == key)
- break;
- }
- if (semid < seminfo.semmni) {
- DPRINTF(("found public key\n"));
- if ((error = ipcperm(td, &sema[semid].sem_perm,
- semflg & 0700))) {
- goto done2;
- }
- if (nsems > 0 && sema[semid].sem_nsems < nsems) {
- DPRINTF(("too small\n"));
- error = EINVAL;
- goto done2;
- }
- if ((semflg & IPC_CREAT) && (semflg & IPC_EXCL)) {
- DPRINTF(("not exclusive\n"));
- error = EEXIST;
- goto done2;
- }
- goto found;
- }
- }
-
- DPRINTF(("need to allocate the semid_ds\n"));
- if (key == IPC_PRIVATE || (semflg & IPC_CREAT)) {
- if (nsems <= 0 || nsems > seminfo.semmsl) {
- DPRINTF(("nsems out of range (0<%d<=%d)\n", nsems,
- seminfo.semmsl));
- error = EINVAL;
- goto done2;
- }
- if (nsems > seminfo.semmns - semtot) {
- DPRINTF((
- "not enough semaphores left (need %d, got %d)\n",
- nsems, seminfo.semmns - semtot));
- error = ENOSPC;
- goto done2;
- }
- for (semid = 0; semid < seminfo.semmni; semid++) {
- if ((sema[semid].sem_perm.mode & SEM_ALLOC) == 0)
- break;
- }
- if (semid == seminfo.semmni) {
- DPRINTF(("no more semid_ds's available\n"));
- error = ENOSPC;
- goto done2;
- }
- DPRINTF(("semid %d is available\n", semid));
- sema[semid].sem_perm.key = key;
-#ifdef __CYGWIN__
- sema[semid].sem_perm.cuid = td->ipcblk->uid;
- sema[semid].sem_perm.uid = td->ipcblk->uid;
- sema[semid].sem_perm.cgid = td->ipcblk->gid;
- sema[semid].sem_perm.gid = td->ipcblk->gid;
-#else
- sema[semid].sem_perm.cuid = cred->cr_uid;
- sema[semid].sem_perm.uid = cred->cr_uid;
- sema[semid].sem_perm.cgid = cred->cr_gid;
- sema[semid].sem_perm.gid = cred->cr_gid;
-#endif
- sema[semid].sem_perm.mode = (semflg & 0777) | SEM_ALLOC;
- sema[semid].sem_perm.seq =
- (sema[semid].sem_perm.seq + 1) & 0x7fff;
- sema[semid].sem_nsems = nsems;
- sema[semid].sem_otime = 0;
- sema[semid].sem_ctime = time (NULL);
- sema[semid].sem_base = &sem[semtot];
- semtot += nsems;
- semtots++;
- bzero(sema[semid].sem_base,
- sizeof(sema[semid].sem_base[0])*nsems);
- DPRINTF(("sembase = 0x%x, next = 0x%x\n", sema[semid].sem_base,
- &sem[semtot]));
- } else {
- DPRINTF(("didn't find it and wasn't asked to create it\n"));
- error = ENOENT;
- goto done2;
- }
-
-found:
- td->td_retval[0] = IXSEQ_TO_IPCID(semid, sema[semid].sem_perm);
-done2:
-#ifdef __CYGWIN__
- if (!error)
- ipcexit_creat_hookthread (td);
-#endif
- mtx_unlock(&Giant);
- return (error);
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct semop_args {
- int semid;
- struct sembuf *sops;
- size_t nsops;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-semop(struct thread *td, struct semop_args *uap)
-{
-#define SMALL_SOPS 8
- struct sembuf small_sops[SMALL_SOPS];
- int semid = uap->semid;
- size_t nsops = uap->nsops;
- struct sembuf *sops;
- struct semid_ds *semaptr;
- struct sembuf *sopptr = 0;
- struct sem *semptr = 0;
- struct sem_undo *suptr;
- struct mtx *sema_mtxp;
- size_t i, j, k;
- int error;
- int do_wakeup, do_undos;
-
- DPRINTF(("call to semop(%d, 0x%x, %u)\n", semid, uap->sops, nsops));
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
- semid = IPCID_TO_IX(semid); /* Convert back to zero origin */
-
- if (semid < 0 || semid >= seminfo.semmni)
- return (EINVAL);
-
- /* Allocate memory for sem_ops */
- if (nsops <= SMALL_SOPS)
- sops = small_sops;
- else if (nsops <= (unsigned long) seminfo.semopm)
- sops = (struct sembuf *) sys_malloc(nsops * sizeof(*sops), M_SEM, M_WAITOK);
- else {
- DPRINTF(("too many sops (max=%d, nsops=%d)\n", seminfo.semopm,
- nsops));
- return (E2BIG);
- }
- if ((error = copyin(uap->sops, sops, nsops * sizeof(sops[0]))) != 0) {
- DPRINTF(("error = %d from copyin(%08x, %08x, %d)\n", error,
- uap->sops, sops, nsops * sizeof(sops[0])));
- if (sops != small_sops)
- sys_free(sops, M_SEM);
- return (error);
- }
-
- semaptr = &sema[semid];
- sema_mtxp = &sema_mtx[semid];
- mtx_lock(sema_mtxp);
- if ((semaptr->sem_perm.mode & SEM_ALLOC) == 0) {
- error = EINVAL;
- goto done2;
- }
- if (semaptr->sem_perm.seq != IPCID_TO_SEQ(uap->semid)) {
- error = EINVAL;
- goto done2;
- }
- /*
- * Initial pass thru sops to see what permissions are needed.
- * Also perform any checks that don't need repeating on each
- * attempt to satisfy the request vector.
- */
- j = 0; /* permission needed */
- do_undos = 0;
- for (i = 0; i < nsops; i++) {
- sopptr = &sops[i];
- if (sopptr->sem_num >= semaptr->sem_nsems) {
- error = EFBIG;
- goto done2;
- }
- if (sopptr->sem_flg & SEM_UNDO && sopptr->sem_op != 0)
- do_undos = 1;
- j |= (sopptr->sem_op == 0) ? SEM_R : SEM_A;
- }
-
- if ((error = ipcperm(td, &semaptr->sem_perm, j))) {
- DPRINTF(("error = %d from ipaccess\n", error));
- goto done2;
- }
-
- /*
- * Loop trying to satisfy the vector of requests.
- * If we reach a point where we must wait, any requests already
- * performed are rolled back and we go to sleep until some other
- * process wakes us up. At this point, we start all over again.
- *
- * This ensures that from the perspective of other tasks, a set
- * of requests is atomic (never partially satisfied).
- */
- for (;;) {
- do_wakeup = 0;
- error = 0; /* error return if necessary */
-
- for (i = 0; i < nsops; i++) {
- sopptr = &sops[i];
- semptr = &semaptr->sem_base[sopptr->sem_num];
-
- DPRINTF((
- "semop: semaptr=%x, sem_base=%x, "
- "semptr=%x, sem[%d]=%d : op=%d, flag=%s\n",
- semaptr, semaptr->sem_base, semptr,
- sopptr->sem_num, semptr->semval, sopptr->sem_op,
- (sopptr->sem_flg & IPC_NOWAIT) ?
- "nowait" : "wait"));
-
- if (sopptr->sem_op < 0) {
- if (semptr->semval + sopptr->sem_op < 0) {
- DPRINTF(("semop: can't do it now\n"));
- break;
- } else {
- semptr->semval += sopptr->sem_op;
- if (semptr->semval == 0 &&
- semptr->semzcnt > 0)
- do_wakeup = 1;
- }
- } else if (sopptr->sem_op == 0) {
- if (semptr->semval != 0) {
- DPRINTF(("semop: not zero now\n"));
- break;
- }
- } else if (semptr->semval + sopptr->sem_op >
- seminfo.semvmx) {
- error = ERANGE;
- break;
- } else {
- if (semptr->semncnt > 0)
- do_wakeup = 1;
- semptr->semval += sopptr->sem_op;
- }
- }
-
- /*
- * Did we get through the entire vector?
- */
- if (i >= nsops)
- goto done;
-
- /*
- * No ... rollback anything that we've already done
- */
- DPRINTF(("semop: rollback 0 through %d\n", i-1));
- for (j = 0; j < i; j++)
- semaptr->sem_base[sops[j].sem_num].semval -=
- sops[j].sem_op;
-
- /* If we detected an error, return it */
- if (error != 0)
- goto done2;
-
- /*
- * If the request that we couldn't satisfy has the
- * NOWAIT flag set then return with EAGAIN.
- */
- if (sopptr->sem_flg & IPC_NOWAIT) {
- error = EAGAIN;
- goto done2;
- }
-
- if (sopptr->sem_op == 0)
- semptr->semzcnt++;
- else
- semptr->semncnt++;
-
- DPRINTF(("semop: good night!\n"));
- error = msleep(semaptr, sema_mtxp, (PZERO - 4) | PCATCH,
- "semwait", 0);
- DPRINTF(("semop: good morning (error=%d)!\n", error));
- /* return code is checked below, after sem[nz]cnt-- */
-
- /*
- * Make sure that the semaphore still exists
- */
- if ((semaptr->sem_perm.mode & SEM_ALLOC) == 0 ||
- semaptr->sem_perm.seq != IPCID_TO_SEQ(uap->semid)) {
- error = EIDRM;
- goto done2;
- }
-
- /*
- * The semaphore is still alive. Readjust the count of
- * waiting processes.
- */
- if (sopptr->sem_op == 0)
- semptr->semzcnt--;
- else
- semptr->semncnt--;
-
- /*
- * Is it really morning, or was our sleep interrupted?
- * (Delayed check of msleep() return code because we
- * need to decrement sem[nz]cnt either way.)
- */
- if (error != 0) {
-#ifdef __CYGWIN__
- if (error != EIDRM)
-#endif /* __CYGWIN__ */
- error = EINTR;
- goto done2;
- }
- DPRINTF(("semop: good morning!\n"));
- }
-
-done:
- /*
- * Process any SEM_UNDO requests.
- */
- if (do_undos) {
- SEMUNDO_LOCK();
- suptr = NULL;
- for (i = 0; i < nsops; i++) {
- /*
- * We only need to deal with SEM_UNDO's for non-zero
- * op's.
- */
- int adjval;
-
- if ((sops[i].sem_flg & SEM_UNDO) == 0)
- continue;
- adjval = sops[i].sem_op;
- if (adjval == 0)
- continue;
- error = semundo_adjust(td, &suptr, semid,
- sops[i].sem_num, -adjval);
- if (error == 0)
- continue;
-
- /*
- * Oh-Oh! We ran out of either sem_undo's or undo's.
- * Rollback the adjustments to this point and then
- * rollback the semaphore ups and down so we can return
- * with an error with all structures restored. We
- * rollback the undo's in the exact reverse order that
- * we applied them. This guarantees that we won't run
- * out of space as we roll things back out.
- */
- for (j = 0; j < i; j++) {
- k = i - j - 1;
- if ((sops[k].sem_flg & SEM_UNDO) == 0)
- continue;
- adjval = sops[k].sem_op;
- if (adjval == 0)
- continue;
- if (semundo_adjust(td, &suptr, semid,
- sops[k].sem_num, adjval) != 0)
- panic("semop - can't undo undos");
- }
-
- for (j = 0; j < nsops; j++)
- semaptr->sem_base[sops[j].sem_num].semval -=
- sops[j].sem_op;
-
- DPRINTF(("error = %d from semundo_adjust\n", error));
- SEMUNDO_UNLOCK();
- goto done2;
- } /* loop through the sops */
- SEMUNDO_UNLOCK();
- } /* if (do_undos) */
-
- /* We're definitely done - set the sempid's and time */
- for (i = 0; i < nsops; i++) {
- sopptr = &sops[i];
- semptr = &semaptr->sem_base[sopptr->sem_num];
- semptr->sempid = td->td_proc->p_pid;
- }
- semaptr->sem_otime = time (NULL);
-
- /*
- * Do a wakeup if any semaphore was up'd whilst something was
- * sleeping on it.
- */
- if (do_wakeup) {
- DPRINTF(("semop: doing wakeup\n"));
- wakeup(semaptr);
- DPRINTF(("semop: back from wakeup\n"));
- }
- DPRINTF(("semop: done\n"));
- td->td_retval[0] = 0;
-done2:
- mtx_unlock(sema_mtxp);
- if (sops != small_sops)
- sys_free(sops, M_SEM);
- return (error);
-}
-
-/*
- * Go through the undo structures for this process and apply the adjustments to
- * semaphores.
- */
-void
-semexit_myhook(void *arg, struct proc *p)
-{
- struct sem_undo *suptr;
- struct sem_undo **supptr;
-
- /*
- * Go through the chain of undo vectors looking for one
- * associated with this process.
- */
- SEMUNDO_HOOKLOCK();
- SLIST_FOREACH_PREVPTR(suptr, supptr, &semu_list, un_next) {
-#ifdef __CYGWIN__
- if (suptr->un_proc == p->winpid)
-#else
- if (suptr->un_proc == p)
-#endif
- break;
- }
-#ifndef __CYGWIN__
- SEMUNDO_UNLOCK();
-#endif
-
- if (suptr == NULL) {
- SEMUNDO_UNLOCK();
- return;
- }
-
-#ifdef __CYGWIN__
- DPRINTF(("proc @%u(%u) has undo structure with %d entries\n",
- p->cygpid, p->winpid, suptr->un_cnt));
-#else
- DPRINTF(("proc @%08x has undo structure with %d entries\n", p,
- suptr->un_cnt));
-#endif
-
- /*
- * If there are any active undo elements then process them.
- */
- if (suptr->un_cnt > 0) {
- int ix;
-
- for (ix = 0; ix < suptr->un_cnt; ix++) {
- int semid = suptr->un_ent[ix].un_id;
- int semnum = suptr->un_ent[ix].un_num;
- int adjval = suptr->un_ent[ix].un_adjval;
- struct semid_ds *semaptr;
- struct mtx *sema_mtxp;
-
- semaptr = &sema[semid];
- sema_mtxp = &sema_mtx[semid];
-#ifdef __CYGWIN__
- _mtx_lock(sema_mtxp, p->winpid, __FILE__, __LINE__);
-#else
- mtx_lock(sema_mtxp);
- SEMUNDO_HOOKLOCK();
-#endif
- if ((semaptr->sem_perm.mode & SEM_ALLOC) == 0)
- panic("semexit - semid not allocated");
- if (semnum >= semaptr->sem_nsems)
- panic("semexit - semnum out of range");
-
- DPRINTF((
-#ifdef __CYGWIN__
- "semexit: %u id=%d num=%d(adj=%d) ; sem=%d\n",
-#else
- "semexit: %08x id=%d num=%d(adj=%d) ; sem=%d\n",
-#endif
- suptr->un_proc, suptr->un_ent[ix].un_id,
- suptr->un_ent[ix].un_num,
- suptr->un_ent[ix].un_adjval,
- semaptr->sem_base[semnum].semval));
-
- if (adjval < 0) {
- if (semaptr->sem_base[semnum].semval < -adjval)
- semaptr->sem_base[semnum].semval = 0;
- else
- semaptr->sem_base[semnum].semval +=
- adjval;
- } else
- semaptr->sem_base[semnum].semval += adjval;
-
- wakeup(semaptr);
- DPRINTF(("semexit: back from wakeup\n"));
- _mtx_unlock(sema_mtxp, __FILE__, __LINE__);
-#ifndef __CYGWIN__
- SEMUNDO_UNLOCK();
-#endif
- }
- }
-
- /*
- * Deallocate the undo vector.
- */
- DPRINTF(("removing vector (%u)\n", suptr->un_proc));
-#ifdef __CYGWIN__
- suptr->un_proc = 0;
-#else
- suptr->un_proc = NULL;
-#endif
- *supptr = SLIST_NEXT(suptr, un_next);
-#ifdef __CYGWIN__
- SEMUNDO_UNLOCK();
-#endif
-}
-
-#ifndef __CYGWIN__
-static int
-sysctl_sema(SYSCTL_HANDLER_ARGS)
-{
-
- return (SYSCTL_OUT(req, sema,
- sizeof(struct semid_ds) * seminfo.semmni));
-}
-#endif /* __CYGWIN__ */
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/sysv_shm.cc b/winsup/cygserver/sysv_shm.cc
deleted file mode 100644
index 2b67587..0000000
--- a/winsup/cygserver/sysv_shm.cc
+++ /dev/null
@@ -1,1043 +0,0 @@
-/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */
-/*
- * Copyright (c) 1994 Adam Glass and Charles Hannum. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Adam Glass and Charles
- * Hannum.
- * 4. The names of the authors may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * This file is heavily changed to become part of Cygwin's cygserver.
- */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#include <sys/cdefs.h>
-#ifndef __FBSDID
-#define __FBSDID(s) const char version[] = (s)
-#endif
-__FBSDID("$FreeBSD: /repoman/r/ncvs/src/sys/kern/sysv_shm.c,v 1.89 2003/11/07 04:47:14 rwatson Exp $");
-
-#define _KERNEL 1
-#define __BSD_VISIBLE 1
-#include <sys/param.h>
-#include <sys/lock.h>
-#include <sys/shm.h>
-#include <malloc.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <sys/sysproto.h>
-
-#include <errno.h>
-#include <time.h>
-#include <unistd.h>
-#include "cygserver.h"
-#include "process.h"
-#include "cygserver_ipc.h"
-
-#ifdef __CYGWIN__
-#ifndef PAGE_SIZE
-#define PAGE_SIZE (getpagesize ())
-#endif
-#ifndef PAGE_MASK
-#define PAGE_MASK (PAGE_SIZE - 1)
-#endif
-#define btoc(b) (((b) + PAGE_MASK) / PAGE_SIZE)
-#define round_page(p) ((((unsigned long)(p)) + PAGE_MASK) & ~(PAGE_MASK))
-#define ACCESSPERMS (0777)
-#ifdef __CYGWIN__
-#define GIANT_REQUIRED
-#else
-#define GIANT_REQUIRED mtx_assert(&Giant, MA_OWNED)
-#endif
-#define KERN_SUCCESS 0
-#define VM_PROT_READ PROT_READ
-#define VM_PROT_WRITE PROT_WRITE
-#define VM_INHERIT_SHARE 0
-#define OBJT_PHYS 0
-#define OBJT_SWAP 0
-#define VM_PROT_DEFAULT 0
-#define VM_OBJECT_LOCK(a)
-#define vm_object_clear_flag(a,b)
-#define vm_object_set_flag(a,b)
-#define VM_OBJECT_UNLOCK(a)
-#define vm_map_remove(a,b,c) KERN_SUCCESS
-typedef int vm_prot_t;
-#endif /* __CYGWIN__ */
-
-#ifndef __CYGWIN__
-static MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments");
-
-struct oshmctl_args;
-static int oshmctl(struct thread *td, struct oshmctl_args *uap);
-#endif /* __CYGWIN__ */
-
-static int shmget_allocate_segment(struct thread *td,
- struct shmget_args *uap, int mode);
-static int shmget_existing(struct thread *td, struct shmget_args *uap,
- int mode, int segnum);
-
-#ifndef __CYGWIN__
-/* XXX casting to (sy_call_t *) is bogus, as usual. */
-static sy_call_t *shmcalls[] = {
- (sy_call_t *)shmat, (sy_call_t *)oshmctl,
- (sy_call_t *)shmdt, (sy_call_t *)shmget,
- (sy_call_t *)shmctl
-};
-#endif /* __CYGWIN__ */
-
-#define SHMSEG_FREE 0x0200
-#define SHMSEG_REMOVED 0x0400
-#define SHMSEG_ALLOCATED 0x0800
-#define SHMSEG_WANTED 0x1000
-
-static int shm_last_free, shm_nused, shm_committed, shmalloced, shm_nattch;
-static struct shmid_ds *shmsegs;
-
-struct shm_handle {
- /* vm_offset_t kva; */
- vm_object_t shm_object;
-};
-
-struct shmmap_state {
- vm_offset_t va;
- int shmid;
-};
-
-static void shm_deallocate_segment(struct shmid_ds *);
-static int shm_find_segment_by_key(key_t);
-static struct shmid_ds *shm_find_segment_by_shmid(int);
-static struct shmid_ds *shm_find_segment_by_shmidx(int);
-static int shm_delete_mapping(struct vmspace *vm, struct shmmap_state *);
-static void shmrealloc(void);
-
-/*
- * Tuneable values.
- */
-#ifndef SHMMAXPGS
-#define SHMMAXPGS 8192 /* Note: sysv shared memory is swap backed. */
-#endif
-#ifndef SHMMAX
-#define SHMMAX (SHMMAXPGS*PAGE_SIZE)
-#endif
-#ifndef SHMMIN
-#define SHMMIN 1
-#endif
-#ifndef SHMMNI
-#define SHMMNI 192
-#endif
-#ifndef SHMSEG
-#define SHMSEG 128
-#endif
-#ifndef SHMALL
-#define SHMALL (SHMMAXPGS)
-#endif
-
-struct shminfo shminfo = {
- SHMMAX,
- SHMMIN,
- SHMMNI,
- SHMSEG,
- SHMALL
-};
-
-#ifndef __CYGWIN__
-static int shm_use_phys;
-#else
-static long shm_use_phys;
-static long shm_allow_removed;
-#endif /* __CYGWIN__ */
-
-#ifndef __CYGWIN__
-struct shm_info shm_info;
-#endif /* __CYGWIN__ */
-
-#ifndef __CYGWIN__
-SYSCTL_DECL(_kern_ipc);
-SYSCTL_INT(_kern_ipc, OID_AUTO, shmmax, CTLFLAG_RW, &shminfo.shmmax, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, shmmin, CTLFLAG_RW, &shminfo.shmmin, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, shmmni, CTLFLAG_RDTUN, &shminfo.shmmni, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, shmseg, CTLFLAG_RDTUN, &shminfo.shmseg, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, shmall, CTLFLAG_RW, &shminfo.shmall, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_phys, CTLFLAG_RW,
- &shm_use_phys, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RW,
- &shm_allow_removed, 0, "");
-SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLFLAG_RD,
- NULL, 0, sysctl_shmsegs, "", "");
-#endif /* __CYGWIN__ */
-
-static int
-shm_find_segment_by_key(key_t key)
-{
- int i;
-
- for (i = 0; i < shmalloced; i++)
- if ((shmsegs[i].shm_perm.mode & SHMSEG_ALLOCATED) &&
- shmsegs[i].shm_perm.key == key)
- return (i);
- return (-1);
-}
-
-static struct shmid_ds *
-shm_find_segment_by_shmid(int shmid)
-{
- int segnum;
- struct shmid_ds *shmseg;
-
- segnum = IPCID_TO_IX(shmid);
- if (segnum < 0 || segnum >= shmalloced)
- return (NULL);
- shmseg = &shmsegs[segnum];
- if ((shmseg->shm_perm.mode & SHMSEG_ALLOCATED) == 0 ||
- (!shm_allow_removed &&
- (shmseg->shm_perm.mode & SHMSEG_REMOVED) != 0) ||
- shmseg->shm_perm.seq != IPCID_TO_SEQ(shmid))
- return (NULL);
- return (shmseg);
-}
-
-static struct shmid_ds *
-shm_find_segment_by_shmidx(int segnum)
-{
- struct shmid_ds *shmseg;
-
- if (segnum < 0 || segnum >= shmalloced)
- return (NULL);
- shmseg = &shmsegs[segnum];
- if ((shmseg->shm_perm.mode & SHMSEG_ALLOCATED) == 0 ||
- (!shm_allow_removed &&
- (shmseg->shm_perm.mode & SHMSEG_REMOVED) != 0))
- return (NULL);
- return (shmseg);
-}
-
-static void
-shm_deallocate_segment(struct shmid_ds *shmseg)
-{
- struct shm_handle *shm_handle;
- size_t size;
-
- GIANT_REQUIRED;
-
- shm_handle = shmseg->shm_internal;
- vm_object_deallocate(shm_handle->shm_object);
- sys_free(shm_handle, M_SHM);
- shmseg->shm_internal = NULL;
- size = round_page(shmseg->shm_segsz);
- shm_committed -= btoc(size);
- shm_nused--;
- shmseg->shm_perm.mode = SHMSEG_FREE;
-}
-
-static int
-shm_delete_mapping(struct vmspace *vm, struct shmmap_state *shmmap_s)
-{
- struct shmid_ds *shmseg;
- int segnum, result;
- size_t size;
-
- GIANT_REQUIRED;
-
- segnum = IPCID_TO_IX(shmmap_s->shmid);
- shmseg = &shmsegs[segnum];
- size = round_page(shmseg->shm_segsz);
- result = vm_map_remove(&vm->vm_map, shmmap_s->va, shmmap_s->va + size);
- if (result != KERN_SUCCESS)
- return (EINVAL);
- shmmap_s->shmid = -1;
- shmseg->shm_dtime = time (NULL);
- --shm_nattch;
- if ((--shmseg->shm_nattch <= 0) &&
- (shmseg->shm_perm.mode & SHMSEG_REMOVED)) {
- shm_deallocate_segment(shmseg);
- shm_last_free = segnum;
- }
- return (0);
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct shmdt_args {
- const void *shmaddr;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-shmdt(struct thread *td, struct shmdt_args *uap)
-{
- struct proc *p = td->td_proc;
- struct shmmap_state *shmmap_s;
- int i;
- int error = 0;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
- mtx_lock(&Giant);
- shmmap_s = p->p_vmspace->vm_shm;
- if (shmmap_s == NULL) {
- error = EINVAL;
- goto done2;
- }
- for (i = 0; i < shminfo.shmseg; i++, shmmap_s++) {
- if (shmmap_s->shmid != -1 &&
- shmmap_s->va == (vm_offset_t)uap->shmaddr) {
- break;
- }
- }
- if (i == shminfo.shmseg) {
- error = EINVAL;
- goto done2;
- }
- error = shm_delete_mapping(p->p_vmspace, shmmap_s);
-done2:
- mtx_unlock(&Giant);
- return (error);
-}
-
-#ifndef _SYS_SYSPROTO_H_
-struct shmat_args {
- int shmid;
- const void *shmaddr;
- int shmflg;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg)
-{
- struct proc *p = td->td_proc;
- int i, flags;
- struct shmid_ds *shmseg;
- struct shmmap_state *shmmap_s = NULL;
-#ifndef __CYGWIN__
- struct shm_handle *shm_handle;
-#endif
- vm_offset_t attach_va;
- vm_prot_t prot;
- vm_size_t size;
-#ifndef __CYGWIN__
- int rv;
-#endif
- int error = 0;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
- mtx_lock(&Giant);
- shmmap_s = p->p_vmspace->vm_shm;
- if (shmmap_s == NULL) {
- size = shminfo.shmseg * sizeof(struct shmmap_state);
- shmmap_s = (struct shmmap_state *) sys_malloc(size, M_SHM, M_WAITOK);
- for (i = 0; i < shminfo.shmseg; i++)
- shmmap_s[i].shmid = -1;
- p->p_vmspace->vm_shm = shmmap_s;
- }
- shmseg = shm_find_segment_by_shmid(shmid);
- if (shmseg == NULL) {
- error = EINVAL;
- goto done2;
- }
- error = ipcperm(td, &shmseg->shm_perm,
- (shmflg & SHM_RDONLY) ? IPC_R : IPC_R|IPC_W);
- if (error)
- goto done2;
- for (i = 0; i < shminfo.shmseg; i++) {
- if (shmmap_s->shmid == -1)
- break;
- shmmap_s++;
- }
- if (i >= shminfo.shmseg) {
- error = EMFILE;
- goto done2;
- }
- size = round_page(shmseg->shm_segsz);
-#ifdef VM_PROT_READ_IS_EXEC
- prot = VM_PROT_READ | VM_PROT_EXECUTE;
-#else
- prot = VM_PROT_READ;
-#endif
- if ((shmflg & SHM_RDONLY) == 0)
- prot |= VM_PROT_WRITE;
- flags = MAP_ANON | MAP_SHARED;
- debug_printf ("shmaddr: %x, shmflg: %x", shmaddr, shmflg);
-#ifdef __CYGWIN__
- /* The alignment checks have already been made in the Cygwin DLL
- and shmat's only job is to keep record of the attached mem.
- These checks break shm on 9x since MapViewOfFileEx apparently
- returns memory which isn't aligned to SHMLBA. Go figure! */
- attach_va = (vm_offset_t)shmaddr;
-#else
- if (shmaddr) {
- flags |= MAP_FIXED;
- if (shmflg & SHM_RND) {
- attach_va = (vm_offset_t)shmaddr & ~(SHMLBA-1);
- } else if (((vm_offset_t)shmaddr & (SHMLBA-1)) == 0) {
- attach_va = (vm_offset_t)shmaddr;
- } else {
- error = EINVAL;
- goto done2;
- }
- } else {
- /*
- * This is just a hint to vm_map_find() about where to
- * put it.
- */
- attach_va = round_page((vm_offset_t)p->p_vmspace->vm_taddr
- + maxtsiz + maxdsiz);
- }
-
- shm_handle = shmseg->shm_internal;
- vm_object_reference(shm_handle->shm_object);
- rv = vm_map_find(&p->p_vmspace->vm_map, shm_handle->shm_object,
- 0, &attach_va, size, (flags & MAP_FIXED)?0:1, prot, prot, 0);
- if (rv != KERN_SUCCESS) {
- error = ENOMEM;
- goto done2;
- }
- vm_map_inherit(&p->p_vmspace->vm_map,
- attach_va, attach_va + size, VM_INHERIT_SHARE);
-#endif
-
- shmmap_s->va = attach_va;
- shmmap_s->shmid = shmid;
- shmseg->shm_lpid = p->p_pid;
- shmseg->shm_atime = time (NULL);
- shmseg->shm_nattch++;
- shm_nattch++;
- td->td_retval[0] = attach_va;
-done2:
- mtx_unlock(&Giant);
- return (error);
-}
-
-int
-shmat(struct thread *td, struct shmat_args *uap)
-{
- return kern_shmat(td, uap->shmid, uap->shmaddr, uap->shmflg);
-}
-
-#ifndef __CYGWIN__
-struct oshmid_ds {
- struct ipc_perm shm_perm; /* operation perms */
- int shm_segsz; /* size of segment (bytes) */
- u_short shm_cpid; /* pid, creator */
- u_short shm_lpid; /* pid, last operation */
- short shm_nattch; /* no. of current attaches */
- time_t shm_atime; /* last attach time */
- time_t shm_dtime; /* last detach time */
- time_t shm_ctime; /* last change time */
- void *shm_handle; /* internal handle for shm segment */
-};
-
-struct oshmctl_args {
- int shmid;
- int cmd;
- struct oshmid_ds *ubuf;
-};
-
-/*
- * MPSAFE
- */
-static int
-oshmctl(struct thread *td, struct oshmctl_args *uap)
-{
-#ifdef COMPAT_43
- int error = 0;
- struct shmid_ds *shmseg;
- struct oshmid_ds outbuf;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
- mtx_lock(&Giant);
- shmseg = shm_find_segment_by_shmid(uap->shmid);
- if (shmseg == NULL) {
- error = EINVAL;
- goto done2;
- }
- switch (uap->cmd) {
- case IPC_STAT:
- error = ipcperm(td, &shmseg->shm_perm, IPC_R);
- if (error)
- goto done2;
- outbuf.shm_perm = shmseg->shm_perm;
- outbuf.shm_segsz = shmseg->shm_segsz;
- outbuf.shm_cpid = shmseg->shm_cpid;
- outbuf.shm_lpid = shmseg->shm_lpid;
- outbuf.shm_nattch = shmseg->shm_nattch;
- outbuf.shm_atime = shmseg->shm_atime;
- outbuf.shm_dtime = shmseg->shm_dtime;
- outbuf.shm_ctime = shmseg->shm_ctime;
- outbuf.shm_handle = shmseg->shm_internal;
- error = copyout(&outbuf, uap->ubuf, sizeof(outbuf));
- if (error)
- goto done2;
- break;
- default:
- /* XXX casting to (sy_call_t *) is bogus, as usual. */
- error = ((sy_call_t *)shmctl)(td, uap);
- break;
- }
-done2:
- mtx_unlock(&Giant);
- return (error);
-#else
- return (EINVAL);
-#endif
-}
-#endif /* __CYGWIN__ */
-
-#ifndef _SYS_SYSPROTO_H_
-struct shmctl_args {
- int shmid;
- int cmd;
- struct shmid_ds *buf;
-};
-#endif
-
-/*
- * MPSAFE
- */
-int
-kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz)
-{
- int error = 0;
- struct shmid_ds *shmseg;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
-
- mtx_lock(&Giant);
- switch (cmd) {
- case IPC_INFO:
- memcpy(buf, &shminfo, sizeof(shminfo));
- if (bufsz)
- *bufsz = sizeof(shminfo);
- td->td_retval[0] = shmalloced;
- goto done2;
- case SHM_INFO: {
- struct shm_info shm_info;
- shm_info.used_ids = shm_nused;
- shm_info.shm_tot = shm_committed * PAGE_SIZE;
-#ifdef __CYGWIN__
- shm_info.shm_atts = shm_nattch;
-#else
- shm_info.shm_rss = 0; /*XXX where to get from ? */
- shm_info.shm_swp = 0; /*XXX where to get from ? */
- shm_info.swap_attempts = 0; /*XXX where to get from ? */
- shm_info.swap_successes = 0; /*XXX where to get from ? */
-#endif /* __CYGWIN__ */
- memcpy(buf, &shm_info, sizeof(shm_info));
- if (bufsz)
- *bufsz = sizeof(shm_info);
- td->td_retval[0] = shmalloced;
- goto done2;
- }
- }
- if (cmd == SHM_STAT)
- shmseg = shm_find_segment_by_shmidx(shmid);
- else
- shmseg = shm_find_segment_by_shmid(shmid);
- if (shmseg == NULL) {
- error = EINVAL;
- goto done2;
- }
- switch (cmd) {
- case SHM_STAT:
- case IPC_STAT:
- error = ipcperm(td, &shmseg->shm_perm, IPC_R);
- if (error)
- goto done2;
- memcpy(buf, shmseg, sizeof(struct shmid_ds));
- if (bufsz)
- *bufsz = sizeof(struct shmid_ds);
- if (cmd == SHM_STAT)
- td->td_retval[0] = IXSEQ_TO_IPCID(shmid, shmseg->shm_perm);
- break;
- case IPC_SET: {
- struct shmid_ds *shmid;
-
- shmid = (struct shmid_ds *)buf;
- error = ipcperm(td, &shmseg->shm_perm, IPC_M);
- if (error)
- goto done2;
- shmseg->shm_perm.uid = shmid->shm_perm.uid;
- shmseg->shm_perm.gid = shmid->shm_perm.gid;
- shmseg->shm_perm.mode =
- (shmseg->shm_perm.mode & ~ACCESSPERMS) |
- (shmid->shm_perm.mode & ACCESSPERMS);
- shmseg->shm_ctime = time (NULL);
- break;
- }
- case IPC_RMID:
- error = ipcperm(td, &shmseg->shm_perm, IPC_M);
- if (error)
- goto done2;
- shmseg->shm_perm.key = IPC_PRIVATE;
- shmseg->shm_perm.mode |= SHMSEG_REMOVED;
- if (shmseg->shm_nattch <= 0) {
- shm_deallocate_segment(shmseg);
- shm_last_free = IPCID_TO_IX(shmid);
- }
- break;
-#if 0
- case SHM_LOCK:
- case SHM_UNLOCK:
-#endif
- default:
- error = EINVAL;
- break;
- }
-done2:
- mtx_unlock(&Giant);
- return (error);
-}
-
-int
-shmctl(struct thread *td, struct shmctl_args *uap)
-{
- int error = 0;
- struct shmid_ds buf;
- size_t bufsz;
-
- /* IPC_SET needs to copyin the buffer before calling kern_shmctl */
- if (uap->cmd == IPC_SET) {
- if ((error = copyin(uap->buf, &buf, sizeof(struct shmid_ds))))
- goto done;
- }
-#ifdef __CYGWIN__
- if (uap->cmd == IPC_INFO && uap->shmid > 0) {
- /* Can't use the default kern_shmctl interface. */
- int shmid = uap->shmid;
- if (shmid > shminfo.shmmni)
- shmid = shminfo.shmmni;
- error = copyout(shmsegs, uap->buf,
- shmid * sizeof(struct shmid_ds));
- td->td_retval[0] = error ? -1 : 0;
- return (error);
- }
-#endif /* __CYGWIN__ */
-
- error = kern_shmctl(td, uap->shmid, uap->cmd, (void *)&buf, &bufsz);
- if (error)
- goto done;
-
- /* Cases in which we need to copyout */
- switch (uap->cmd) {
- case IPC_INFO:
- case SHM_INFO:
- case SHM_STAT:
- case IPC_STAT:
- error = copyout(&buf, uap->buf, bufsz);
- break;
- }
-
-done:
- if (error) {
- /* Invalidate the return value */
- td->td_retval[0] = -1;
- }
- return (error);
-}
-
-
-#ifndef _SYS_SYSPROTO_H_
-struct shmget_args {
- key_t key;
- size_t size;
- int shmflg;
-};
-#endif
-
-static int
-shmget_existing(struct thread *td, struct shmget_args *uap, int mode, int segnum)
-{
- struct shmid_ds *shmseg;
- int error;
-
- shmseg = &shmsegs[segnum];
- if (shmseg->shm_perm.mode & SHMSEG_REMOVED) {
- /*
- * This segment is in the process of being allocated. Wait
- * until it's done, and look the key up again (in case the
- * allocation failed or it was freed).
- */
- shmseg->shm_perm.mode |= SHMSEG_WANTED;
- error = tsleep(shmseg, PLOCK | PCATCH, "shmget", 0);
- if (error)
- return (error);
- return (EAGAIN);
- }
- if ((uap->shmflg & (IPC_CREAT | IPC_EXCL)) == (IPC_CREAT | IPC_EXCL))
- return (EEXIST);
- error = ipcperm(td, &shmseg->shm_perm, mode);
- if (error)
- return (error);
- if (uap->size && uap->size > shmseg->shm_segsz)
- return (EINVAL);
- td->td_retval[0] = IXSEQ_TO_IPCID(segnum, shmseg->shm_perm);
-#ifdef __CYGWIN__
- td->td_retval[1] =
- vm_object_duplicate(td, shmseg->shm_internal->shm_object);
-#endif /* __CYGWIN__ */
- return (0);
-}
-
-static int
-shmget_allocate_segment(struct thread *td, struct shmget_args *uap, int mode)
-{
- int i, segnum, shmid, size;
-#ifndef __CYGWIN__
- struct ucred *cred = td->td_ucred;
-#endif /* __CYGWIN__ */
- struct shmid_ds *shmseg;
- struct shm_handle *shm_handle;
-
- GIANT_REQUIRED;
-
- if (uap->size < (unsigned long) shminfo.shmmin ||
- uap->size > (unsigned long) shminfo.shmmax)
- return (EINVAL);
- if (shm_nused >= shminfo.shmmni) /* Any shmids left? */
- return (ENOSPC);
- size = round_page(uap->size);
- if (shm_committed + btoc(size) > (unsigned long) shminfo.shmall)
- return (ENOMEM);
- if (shm_last_free < 0) {
- shmrealloc(); /* Maybe expand the shmsegs[] array. */
- for (i = 0; i < shmalloced; i++)
- if (shmsegs[i].shm_perm.mode & SHMSEG_FREE)
- break;
- if (i == shmalloced)
- return (ENOSPC);
- segnum = i;
- } else {
- segnum = shm_last_free;
- shm_last_free = -1;
- }
- shmseg = &shmsegs[segnum];
- /*
- * In case we sleep in malloc(), mark the segment present but deleted
- * so that noone else tries to create the same key.
- */
- shmseg->shm_perm.mode = SHMSEG_ALLOCATED | SHMSEG_REMOVED;
- shmseg->shm_perm.key = uap->key;
- shmseg->shm_perm.seq = (shmseg->shm_perm.seq + 1) & 0x7fff;
- shm_handle = (struct shm_handle *)
- sys_malloc(sizeof(struct shm_handle), M_SHM, M_WAITOK);
- shmid = IXSEQ_TO_IPCID(segnum, shmseg->shm_perm);
-
- /*
- * We make sure that we have allocated a pager before we need
- * to.
- */
- if (shm_use_phys) {
- shm_handle->shm_object =
- vm_pager_allocate(OBJT_PHYS, 0, size, VM_PROT_DEFAULT, 0);
- } else {
- shm_handle->shm_object =
- vm_pager_allocate(OBJT_SWAP, 0, size, VM_PROT_DEFAULT, 0);
- }
- VM_OBJECT_LOCK(shm_handle->shm_object);
- vm_object_clear_flag(shm_handle->shm_object, OBJ_ONEMAPPING);
- vm_object_set_flag(shm_handle->shm_object, OBJ_NOSPLIT);
- VM_OBJECT_UNLOCK(shm_handle->shm_object);
-
- shmseg->shm_internal = shm_handle;
-#ifdef __CYGWIN__
- shmseg->shm_perm.cuid = shmseg->shm_perm.uid = td->ipcblk->uid;
- shmseg->shm_perm.cgid = shmseg->shm_perm.gid = td->ipcblk->gid;
-#else
- shmseg->shm_perm.cuid = shmseg->shm_perm.uid = cred->cr_uid;
- shmseg->shm_perm.cgid = shmseg->shm_perm.gid = cred->cr_gid;
-#endif /* __CYGWIN__ */
- shmseg->shm_perm.mode = (shmseg->shm_perm.mode & SHMSEG_WANTED) |
- (mode & ACCESSPERMS) | SHMSEG_ALLOCATED;
- shmseg->shm_segsz = uap->size;
- shmseg->shm_cpid = td->td_proc->p_pid;
- shmseg->shm_lpid = shmseg->shm_nattch = 0;
- shmseg->shm_atime = shmseg->shm_dtime = 0;
- shmseg->shm_ctime = time (NULL);
- shm_committed += btoc(size);
- shm_nused++;
- if (shmseg->shm_perm.mode & SHMSEG_WANTED) {
- /*
- * Somebody else wanted this key while we were asleep. Wake
- * them up now.
- */
- shmseg->shm_perm.mode &= ~SHMSEG_WANTED;
- wakeup(shmseg);
- }
- td->td_retval[0] = shmid;
-#ifdef __CYGWIN__
- td->td_retval[1] =
- vm_object_duplicate(td, shmseg->shm_internal->shm_object);
-#endif /* __CYGWIN__ */
- return (0);
-}
-
-/*
- * MPSAFE
- */
-int
-shmget(struct thread *td, struct shmget_args *uap)
-{
- int segnum, mode;
- int error;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
- mtx_lock(&Giant);
- mode = uap->shmflg & ACCESSPERMS;
- if (uap->key != IPC_PRIVATE) {
- again:
-#ifdef __CYGWIN__
- if (uap->shmflg & IPC_KEY_IS_SHMID)
- segnum = shm_find_segment_by_shmid ((int) uap->key) ?
- IPCID_TO_IX((int) uap->key) : -1;
- else
-#endif
- segnum = shm_find_segment_by_key(uap->key);
- if (segnum >= 0) {
- error = shmget_existing(td, uap, mode, segnum);
- if (error == EAGAIN)
- goto again;
- goto done2;
- }
- if ((uap->shmflg & IPC_CREAT) == 0) {
- error = ENOENT;
- goto done2;
- }
- }
- error = shmget_allocate_segment(td, uap, mode);
-done2:
-#ifdef __CYGWIN__
- if (!error)
- ipcexit_creat_hookthread (td);
- else
- td->td_retval[0] = -1;
-#endif
- mtx_unlock(&Giant);
- return (error);
-}
-
-#ifndef __CYGWIN__
-/*
- * MPSAFE
- */
-int
-shmsys(td, uap)
- struct thread *td;
- /* XXX actually varargs. */
- struct shmsys_args /* {
- int which;
- int a2;
- int a3;
- int a4;
- } */ *uap;
-{
- int error;
-
- if (!jail_sysvipc_allowed && jailed(td->td_ucred))
- return (ENOSYS);
- if (uap->which < 0 ||
- uap->which >= sizeof(shmcalls)/sizeof(shmcalls[0]))
- return (EINVAL);
- mtx_lock(&Giant);
- error = (*shmcalls[uap->which])(td, &uap->a2);
- mtx_unlock(&Giant);
- return (error);
-}
-#endif /* __CYGWIN__ */
-
-static void
-shmfork_myhook(struct proc *p1, struct proc *p2)
-{
- struct shmmap_state *shmmap_s;
- size_t size;
- int i;
-
- size = shminfo.shmseg * sizeof(struct shmmap_state);
- shmmap_s = (struct shmmap_state *) sys_malloc(size, M_SHM, M_WAITOK);
- bcopy(p1->p_vmspace->vm_shm, shmmap_s, size);
- p2->p_vmspace->vm_shm = shmmap_s;
- for (i = 0; i < shminfo.shmseg; i++, shmmap_s++)
- if (shmmap_s->shmid != -1) {
- shm_nattch++;
- shmsegs[IPCID_TO_IX(shmmap_s->shmid)].shm_nattch++;
- }
-}
-
-#ifdef __CYGWIN__
-int cygwin_shmfork_myhook (struct thread *td, struct proc *parent)
-{
- ipcexit_creat_hookthread (td);
- ipc_p_vmspace (td->ipcblk);
- ipc_p_vmspace (parent);
- shmfork_myhook (parent, td->ipcblk);
- return 0;
-}
-#endif
-
-void
-shmexit_myhook(struct vmspace *vm)
-{
- struct shmmap_state *base, *shm;
- int i;
-
- GIANT_REQUIRED;
-
- if ((base = vm->vm_shm) != NULL) {
- vm->vm_shm = NULL;
- for (i = 0, shm = base; i < shminfo.shmseg; i++, shm++) {
- if (shm->shmid != -1)
- shm_delete_mapping(vm, shm);
- }
- sys_free(base, M_SHM);
- }
-}
-
-static void
-shmrealloc(void)
-{
- int i;
- struct shmid_ds *newsegs;
-
- if (shmalloced >= shminfo.shmmni)
- return;
-
- newsegs = (struct shmid_ds *) sys_malloc(shminfo.shmmni * sizeof(*newsegs), M_SHM, M_WAITOK);
- if (newsegs == NULL)
- return;
- for (i = 0; i < shmalloced; i++)
- bcopy(&shmsegs[i], &newsegs[i], sizeof(newsegs[0]));
- for (; i < shminfo.shmmni; i++) {
- shmsegs[i].shm_perm.mode = SHMSEG_FREE;
- shmsegs[i].shm_perm.seq = 0;
- }
- sys_free(shmsegs, M_SHM);
- shmsegs = newsegs;
- shmalloced = shminfo.shmmni;
-}
-
-void
-shminit(void)
-{
- int i;
-
- TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
- for (i = PAGE_SIZE; i > 0; i--) {
- shminfo.shmmax = shminfo.shmall * PAGE_SIZE;
- if (shminfo.shmmax >= shminfo.shmall)
- break;
- }
- TUNABLE_INT_FETCH("kern.ipc.shmmin", &shminfo.shmmin);
- TUNABLE_INT_FETCH("kern.ipc.shmmni", &shminfo.shmmni);
- TUNABLE_INT_FETCH("kern.ipc.shmseg", &shminfo.shmseg);
- TUNABLE_INT_FETCH("kern.ipc.shm_use_phys", &shm_use_phys);
-
- shmalloced = shminfo.shmmni;
- shmsegs = (struct shmid_ds *) sys_malloc(shmalloced * sizeof(shmsegs[0]), M_SHM, M_WAITOK);
- if (shmsegs == NULL)
- panic("cannot allocate initial memory for sysvshm");
- for (i = 0; i < shmalloced; i++) {
- shmsegs[i].shm_perm.mode = SHMSEG_FREE;
- shmsegs[i].shm_perm.seq = 0;
- }
- shm_last_free = 0;
- shm_nused = 0;
- shm_committed = 0;
-#ifndef __CYGWIN__
- shmexit_hook = &shmexit_myhook;
- shmfork_hook = &shmfork_myhook;
-#endif /* __CYGWIN__ */
-}
-
-int
-shmunload(void)
-{
-
- if (shm_nused > 0)
- return (EBUSY);
-
- sys_free(shmsegs, M_SHM);
-#ifndef __CYGWIN__
- shmexit_hook = NULL;
- shmfork_hook = NULL;
-#endif /* __CYGWIN__ */
- return (0);
-}
-
-#ifndef __CYGWIN__
-static int
-sysctl_shmsegs(SYSCTL_HANDLER_ARGS)
-{
-
- return (SYSCTL_OUT(req, shmsegs, shmalloced * sizeof(shmsegs[0])));
-}
-
-static int
-sysvshm_modload(struct module *module, int cmd, void *arg)
-{
- int error = 0;
-
- switch (cmd) {
- case MOD_LOAD:
- shminit();
- break;
- case MOD_UNLOAD:
- error = shmunload();
- break;
- case MOD_SHUTDOWN:
- break;
- default:
- error = EINVAL;
- break;
- }
- return (error);
-}
-
-static moduledata_t sysvshm_mod = {
- "sysvshm",
- &sysvshm_modload,
- NULL
-};
-
-SYSCALL_MODULE_HELPER(shmsys);
-SYSCALL_MODULE_HELPER(shmat);
-SYSCALL_MODULE_HELPER(shmctl);
-SYSCALL_MODULE_HELPER(shmdt);
-SYSCALL_MODULE_HELPER(shmget);
-
-DECLARE_MODULE(sysvshm, sysvshm_mod,
- SI_SUB_SYSV_SHM, SI_ORDER_FIRST);
-MODULE_VERSION(sysvshm, 1);
-#endif /* __CYGWIN__ */
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/threaded_queue.cc b/winsup/cygserver/threaded_queue.cc
deleted file mode 100644
index 53dd6fa..0000000
--- a/winsup/cygserver/threaded_queue.cc
+++ /dev/null
@@ -1,410 +0,0 @@
-/* threaded_queue.cc
-
- Copyright 2001, 2002, 2003 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.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. */
-
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-
-#include <assert.h>
-#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include "threaded_queue.h"
-
-/*****************************************************************************/
-
-/* queue_request */
-
-queue_request::~queue_request ()
-{}
-
-/*****************************************************************************/
-
-/* threaded_queue */
-
-threaded_queue::threaded_queue (const size_t initial_workers)
- : _workers_count (0),
- _running (false),
- _submitters_head (NULL),
- _requests_count (0),
- _requests_head (NULL),
- _requests_sem (NULL)
-{
- InitializeCriticalSection (&_queue_lock);
-
- // This semaphore's count is the number of requests on the queue.
- // The maximum count (129792) is calculated as MAXIMUM_WAIT_OBJECTS
- // multiplied by max. threads per process (2028?), which is (a few)
- // more requests than could ever be pending with the current design.
-
- _requests_sem = CreateSemaphore (NULL, // SECURITY_ATTRIBUTES
- 0, // Initial count
- 129792, // Maximum count
- NULL); // Anonymous
-
- if (!_requests_sem)
- {
- system_printf (("failed to create the request queue semaphore, "
- "error = %lu"),
- GetLastError ());
- abort ();
- }
-
- create_workers (initial_workers);
-}
-
-threaded_queue::~threaded_queue ()
-{
- if (_running)
- stop ();
-
- debug_printf ("deleting all pending queue requests");
- queue_request *reqptr = _requests_head;
- while (reqptr)
- {
- queue_request *const ptr = reqptr;
- reqptr = reqptr->_next;
- delete ptr;
- }
-
- DeleteCriticalSection (&_queue_lock);
- if (_requests_sem)
- (void) CloseHandle (_requests_sem);
-}
-
-/* FIXME: return success or failure rather than quitting */
-void
-threaded_queue::add_submission_loop (queue_submission_loop *const submitter)
-{
- assert (this);
- assert (submitter);
- assert (submitter->_queue == this);
- assert (!submitter->_next);
-
- submitter->_next =
- TInterlockedExchangePointer (&_submitters_head, submitter);
-
- if (_running)
- submitter->start ();
-}
-
-bool
-threaded_queue::start ()
-{
- EnterCriticalSection (&_queue_lock);
- const bool was_running = _running;
- _running = true;
- queue_submission_loop *loopptr = _submitters_head;
- LeaveCriticalSection (&_queue_lock);
-
- if (!was_running)
- {
- debug_printf ("starting all queue submission loops");
-
- while (loopptr)
- {
- queue_submission_loop *const ptr = loopptr;
- loopptr = loopptr->_next;
- ptr->start ();
- }
- }
-
- return was_running;
-}
-
-bool
-threaded_queue::stop ()
-{
- EnterCriticalSection (&_queue_lock);
- const bool was_running = _running;
- _running = false;
- queue_submission_loop *loopptr = _submitters_head;
- LeaveCriticalSection (&_queue_lock);
-
- if (was_running)
- {
- debug_printf ("stopping all queue submission loops");
- while (loopptr)
- {
- queue_submission_loop *const ptr = loopptr;
- loopptr = loopptr->_next;
- ptr->stop ();
- }
-
- ReleaseSemaphore (_requests_sem, _workers_count, NULL);
- while (_workers_count)
- {
- debug_printf (("waiting for worker threads to terminate: "
- "%lu still running"),
- _workers_count);
- Sleep (1000);
- }
- debug_printf ("all worker threads have terminated");
- }
-
- return was_running;
-}
-
-/* FIXME: return success or failure */
-void
-threaded_queue::add (queue_request *const therequest)
-{
- assert (this);
- assert (therequest);
- assert (!therequest->_next);
-
- if (!_workers_count)
- {
- system_printf ("warning: no worker threads to handle request!");
- // FIXME: And then what?
- }
-
- EnterCriticalSection (&_queue_lock);
- if (!_requests_head)
- _requests_head = therequest;
- else
- {
- /* Add to the queue end. */
- queue_request *reqptr = _requests_head;
- for (; reqptr->_next; reqptr = reqptr->_next)
- {}
- assert (reqptr);
- assert (!reqptr->_next);
- reqptr->_next = therequest;
- }
-
- _requests_count += 1;
- assert (_requests_count > 0);
- LeaveCriticalSection (&_queue_lock);
-
- (void) ReleaseSemaphore (_requests_sem, 1, NULL);
-}
-
-/*static*/ DWORD WINAPI
-threaded_queue::start_routine (const LPVOID lpParam)
-{
- class threaded_queue *const queue = (class threaded_queue *) lpParam;
- assert (queue);
-
- queue->worker_loop ();
-
- const long count = InterlockedDecrement (&queue->_workers_count);
- assert (count >= 0);
-
- if (queue->_running)
- debug_printf ("worker loop has exited; thread about to terminate");
-
- return 0;
-}
-
-/* Called from the constructor: so no need to be thread-safe until the
- * worker threads start to be created; thus the interlocked increment
- * of the `_workers_count' field.
- */
-
-void
-threaded_queue::create_workers (const size_t initial_workers)
-{
- assert (initial_workers > 0);
-
- for (unsigned int i = 0; i != initial_workers; i++)
- {
- const long count = InterlockedIncrement (&_workers_count);
- assert (count > 0);
-
- DWORD tid;
- const HANDLE hThread =
- CreateThread (NULL, 0, start_routine, this, 0, &tid);
-
- if (!hThread)
- {
- system_printf ("failed to create thread, error = %lu",
- GetLastError ());
- abort ();
- }
-
- (void) CloseHandle (hThread);
- }
-}
-
-void
-threaded_queue::worker_loop ()
-{
- while (true)
- {
- const DWORD rc = WaitForSingleObject (_requests_sem, INFINITE);
- if (rc == WAIT_FAILED)
- {
- system_printf ("wait for request semaphore failed, error = %lu",
- GetLastError ());
- return;
- }
- assert (rc == WAIT_OBJECT_0);
-
- EnterCriticalSection (&_queue_lock);
- if (!_running)
- {
- LeaveCriticalSection (&_queue_lock);
- return;
- }
-
- assert (_requests_head);
- queue_request *const reqptr = _requests_head;
- _requests_head = reqptr->_next;
-
- _requests_count -= 1;
- assert (_requests_count >= 0);
- LeaveCriticalSection (&_queue_lock);
-
- assert (reqptr);
- reqptr->process ();
- delete reqptr;
- }
-}
-
-/*****************************************************************************/
-
-/* queue_submission_loop */
-
-queue_submission_loop::queue_submission_loop (threaded_queue *const queue,
- const bool ninterruptible)
- : _running (false),
- _interrupt_event (NULL),
- _queue (queue),
- _interruptible (ninterruptible),
- _hThread (NULL),
- _tid (0),
- _next (NULL)
-{
- if (_interruptible)
- {
- // verbose: debug_printf ("creating an interruptible processing thread");
-
- _interrupt_event = CreateEvent (NULL, // SECURITY_ATTRIBUTES
- FALSE, // Auto-reset
- FALSE, // Initially non-signalled
- NULL); // Anonymous
-
- if (!_interrupt_event)
- {
- system_printf ("failed to create interrupt event, error = %lu",
- GetLastError ());
- abort ();
- }
- }
-}
-
-queue_submission_loop::~queue_submission_loop ()
-{
- if (_running)
- stop ();
- if (_interrupt_event)
- (void) CloseHandle (_interrupt_event);
- if (_hThread)
- (void) CloseHandle (_hThread);
-}
-
-bool
-queue_submission_loop::start ()
-{
- assert (this);
- assert (!_hThread);
-
- const bool was_running = _running;
-
- if (!was_running)
- {
- _running = true;
-
- _hThread = CreateThread (NULL, 0, start_routine, this, 0, &_tid);
- if (!_hThread)
- {
- system_printf ("failed to create thread, error = %lu",
- GetLastError ());
- abort ();
- }
- }
-
- return was_running;
-}
-
-bool
-queue_submission_loop::stop ()
-{
- assert (this);
- assert (_hThread && _hThread != INVALID_HANDLE_VALUE);
-
- const bool was_running = _running;
-
- if (_running)
- {
- _running = false;
-
- if (_interruptible)
- {
- assert (_interrupt_event
- && _interrupt_event != INVALID_HANDLE_VALUE);
-
- SetEvent (_interrupt_event);
-
- if (WaitForSingleObject (_hThread, 1000) == WAIT_TIMEOUT)
- {
- system_printf (("request loop thread %lu failed to shutdown "
- "when asked politely: about to get heavy"),
- _tid);
-
- if (!TerminateThread (_hThread, 0))
- {
- system_printf (("failed to kill request loop thread %lu"
- ", error = %lu"),
- _tid, GetLastError ());
- abort ();
- }
- }
- }
- else
- {
- // FIXME: could wait to see if the request loop notices that
- // the submission loop is no longer running and shuts down
- // voluntarily.
-
- debug_printf ("killing request loop thread %lu", _tid);
-
- if (!TerminateThread (_hThread, 0))
- system_printf (("failed to kill request loop thread %lu"
- ", error = %lu"),
- _tid, GetLastError ());
- }
- }
-
- return was_running;
-}
-
-/*static*/ DWORD WINAPI
-queue_submission_loop::start_routine (const LPVOID lpParam)
-{
- class queue_submission_loop *const submission_loop =
- (class queue_submission_loop *) lpParam;
- assert (submission_loop);
-
- submission_loop->request_loop ();
-
- debug_printf ("submission loop has exited; thread about to terminate");
-
- submission_loop->stop ();
-
- return 0;
-}
-
-/*****************************************************************************/
-#endif /* __OUTSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/threaded_queue.h b/winsup/cygserver/threaded_queue.h
deleted file mode 100644
index 0c3f991..0000000
--- a/winsup/cygserver/threaded_queue.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* threaded_queue.h
-
- Copyright 2001, 2002, 2003 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _THREADED_QUEUE_
-#define _THREADED_QUEUE_
-
-/*****************************************************************************/
-
-/* a specific request */
-
-class queue_request
-{
-public:
- queue_request *_next;
-
- queue_request () : _next (NULL) {}
- virtual ~queue_request ();
-
- virtual void process () = 0;
-};
-
-/*****************************************************************************/
-
-/* a queue to allocate requests from n submission loops to x worker threads */
-
-class queue_submission_loop;
-
-class threaded_queue
-{
-public:
- threaded_queue (size_t initial_workers = 1);
- ~threaded_queue ();
-
- void add_submission_loop (queue_submission_loop *);
-
- bool running () const { return _running; }
-
- bool start ();
- bool stop ();
-
- void add (queue_request *);
-
-private:
- long _workers_count;
- bool _running;
-
- queue_submission_loop *_submitters_head;
-
- long _requests_count; // Informational only.
- queue_request *_requests_head;
-
- CRITICAL_SECTION _queue_lock;
- HANDLE _requests_sem; // == _requests_count
-
- static DWORD WINAPI start_routine (LPVOID /* this */);
-
- void create_workers (size_t initial_workers);
- void worker_loop ();
-};
-
-/*****************************************************************************/
-
-/* parameters for a request finding and submitting loop */
-
-class queue_submission_loop
-{
- friend class threaded_queue;
-
-public:
- queue_submission_loop (threaded_queue *, bool ninterruptible);
- virtual ~queue_submission_loop ();
-
- bool start ();
- bool stop ();
-
- threaded_queue *queue () { return _queue; };
-
-protected:
- bool _running;
- HANDLE _interrupt_event;
- threaded_queue *const _queue;
-
-private:
- bool _interruptible;
- HANDLE _hThread;
- DWORD _tid;
- queue_submission_loop *_next;
-
- static DWORD WINAPI start_routine (LPVOID /* this */);
- virtual void request_loop () = 0;
-};
-
-#ifdef __cplusplus
-
-/*---------------------------------------------------------------------------*
- * Some type-safe versions of the various interlocked functions.
- *---------------------------------------------------------------------------*/
-
-template <typename T> T *
-TInterlockedExchangePointer (T **lvalue, T *rvalue)
-{
- return reinterpret_cast<T *>
- (InterlockedExchangePointer (reinterpret_cast<void **> (lvalue),
- reinterpret_cast<void *> (rvalue)));
-}
-
-template <typename T> T *
-TInterlockedCompareExchangePointer (T **lvalue, T *rvalue1, T *rvalue2)
-{
- return reinterpret_cast<T *>
- (InterlockedCompareExchangePointer (reinterpret_cast<void **> (lvalue),
- reinterpret_cast<void *> (rvalue1),
- reinterpret_cast<void *> (rvalue2)));
-}
-
-#endif /* __cplusplus */
-
-#endif /* _THREADED_QUEUE_ */
diff --git a/winsup/cygserver/transport.cc b/winsup/cygserver/transport.cc
deleted file mode 100644
index 0e97082..0000000
--- a/winsup/cygserver/transport.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-/* transport.cc
-
- Copyright 2001, 2002, 2003, 2004 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.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. */
-
-/* to allow this to link into cygwin and the .dll, a little magic is needed. */
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#else
-#include "winsup.h"
-#endif
-
-#include <sys/socket.h>
-
-#include "transport.h"
-#include "transport_pipes.h"
-#include "transport_sockets.h"
-
-/* The factory */
-transport_layer_base *
-create_server_transport ()
-{
- if (wincap.is_winnt ())
- return new transport_layer_pipes;
- else
- return new transport_layer_sockets;
-}
-
-#ifndef __INSIDE_CYGWIN__
-
-bool
-transport_layer_base::impersonate_client ()
-{
- return true;
-}
-
-bool
-transport_layer_base::revert_to_self ()
-{
- return true;
-}
-
-#endif /* !__INSIDE_CYGWIN__ */
-
-transport_layer_base::~transport_layer_base ()
-{}
diff --git a/winsup/cygserver/transport.h b/winsup/cygserver/transport.h
deleted file mode 100644
index 80f50fd..0000000
--- a/winsup/cygserver/transport.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* transport.h
-
- Copyright 2001, 2002, 2003, 2004 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _TRANSPORT_H
-#define _TRANSPORT_H
-
-class transport_layer_base *create_server_transport ();
-
-class transport_layer_base
-{
-public:
-#ifndef __INSIDE_CYGWIN__
- virtual int listen () = 0;
- virtual class transport_layer_base *accept (bool *recoverable) = 0;
-#endif
-
- virtual void close () = 0;
- virtual ssize_t read (void *buf, size_t len) = 0;
- virtual ssize_t write (void *buf, size_t len) = 0;
- virtual int connect () = 0;
-
-#ifndef __INSIDE_CYGWIN__
- virtual bool impersonate_client ();
- virtual bool revert_to_self ();
-#endif
-
- virtual ~transport_layer_base ();
-};
-
-#endif /* _TRANSPORT_H */
diff --git a/winsup/cygserver/transport_pipes.cc b/winsup/cygserver/transport_pipes.cc
deleted file mode 100644
index 9fdf758..0000000
--- a/winsup/cygserver/transport_pipes.cc
+++ /dev/null
@@ -1,355 +0,0 @@
-/* transport_pipes.cc
-
- Copyright 2001, 2002, 2003, 2004 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.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. */
-
-/* to allow this to link into cygwin and the .dll, a little magic is needed. */
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#else
-#include "winsup.h"
-#endif
-
-#include <sys/types.h>
-
-#include <assert.h>
-#include <netdb.h>
-#include <pthread.h>
-#include <unistd.h>
-
-#include "cygerrno.h"
-#include "transport.h"
-#include "transport_pipes.h"
-
-#ifndef __INSIDE_CYGWIN__
-#include "cygserver.h"
-#include "cygserver_ipc.h"
-#else
-#include "security.h"
-#endif
-
-#ifdef __INSIDE_CYGWIN__
-#define SET_ERRNO(err) set_errno (err)
-#else
-#define SET_ERRNO(err) errno = (err)
-#endif
-
-enum
- {
- MAX_WAIT_NAMED_PIPE_RETRY = 64,
- WAIT_NAMED_PIPE_TIMEOUT = 10 // milliseconds
- };
-
-#ifndef __INSIDE_CYGWIN__
-
-static pthread_once_t pipe_instance_lock_once = PTHREAD_ONCE_INIT;
-static CRITICAL_SECTION pipe_instance_lock;
-static long pipe_instance = 0;
-
-static void
-initialise_pipe_instance_lock ()
-{
- assert (pipe_instance == 0);
- InitializeCriticalSection (&pipe_instance_lock);
-}
-
-#endif /* !__INSIDE_CYGWIN__ */
-
-#ifndef __INSIDE_CYGWIN__
-
-transport_layer_pipes::transport_layer_pipes (const HANDLE hPipe)
- : _pipe_name (""),
- _hPipe (hPipe),
- _is_accepted_endpoint (true),
- _is_listening_endpoint (false)
-{
- assert (_hPipe);
- assert (_hPipe != INVALID_HANDLE_VALUE);
-
-}
-
-#endif /* !__INSIDE_CYGWIN__ */
-
-transport_layer_pipes::transport_layer_pipes ()
- : _pipe_name ("\\\\.\\pipe\\cygwin_lpc"),
- _hPipe (NULL),
- _is_accepted_endpoint (false),
- _is_listening_endpoint (false)
-{
-}
-
-transport_layer_pipes::~transport_layer_pipes ()
-{
- close ();
-}
-
-#ifndef __INSIDE_CYGWIN__
-
-int
-transport_layer_pipes::listen ()
-{
- assert (!_hPipe);
- assert (!_is_accepted_endpoint);
- assert (!_is_listening_endpoint);
-
- _is_listening_endpoint = true;
-
- /* no-op */
- return 0;
-}
-
-class transport_layer_pipes *
-transport_layer_pipes::accept (bool *const recoverable)
-{
- assert (!_hPipe);
- assert (!_is_accepted_endpoint);
- assert (_is_listening_endpoint);
-
- pthread_once (&pipe_instance_lock_once, &initialise_pipe_instance_lock);
-
- EnterCriticalSection (&pipe_instance_lock);
-
- // Read: http://www.securityinternals.com/research/papers/namedpipe.php
- // See also the Microsoft security bulletins MS00-053 and MS01-031.
-
- // FIXME: Remove FILE_CREATE_PIPE_INSTANCE.
-
- const bool first_instance = (pipe_instance == 0);
-
- const HANDLE accept_pipe =
- CreateNamedPipe (_pipe_name,
- (PIPE_ACCESS_DUPLEX
- | (first_instance ? FILE_FLAG_FIRST_PIPE_INSTANCE : 0)),
- (PIPE_TYPE_BYTE | PIPE_WAIT),
- PIPE_UNLIMITED_INSTANCES,
- 0, 0, 1000,
- &sec_all_nih);
-
- const bool duplicate = (accept_pipe == INVALID_HANDLE_VALUE
- && pipe_instance == 0
- && GetLastError () == ERROR_ACCESS_DENIED);
-
- if (accept_pipe != INVALID_HANDLE_VALUE)
- InterlockedIncrement (&pipe_instance);
-
- LeaveCriticalSection (&pipe_instance_lock);
-
- if (duplicate)
- {
- *recoverable = false;
- system_printf ("failed to create named pipe: "
- "is the daemon already running?");
- return NULL;
- }
-
- if (accept_pipe == INVALID_HANDLE_VALUE)
- {
- debug_printf ("error creating pipe (%lu).", GetLastError ());
- *recoverable = true; // FIXME: case analysis?
- return NULL;
- }
-
- assert (accept_pipe);
-
- if (!ConnectNamedPipe (accept_pipe, NULL)
- && GetLastError () != ERROR_PIPE_CONNECTED)
- {
- debug_printf ("error connecting to pipe (%lu)", GetLastError ());
- (void) CloseHandle (accept_pipe);
- *recoverable = true; // FIXME: case analysis?
- return NULL;
- }
-
- return new transport_layer_pipes (accept_pipe);
-}
-
-#endif /* !__INSIDE_CYGWIN__ */
-
-void
-transport_layer_pipes::close ()
-{
- // verbose: debug_printf ("closing pipe %p", _hPipe);
-
- if (_hPipe)
- {
- assert (_hPipe != INVALID_HANDLE_VALUE);
-
-#ifndef __INSIDE_CYGWIN__
-
- if (_is_accepted_endpoint)
- {
- (void) FlushFileBuffers (_hPipe); // Blocks until client reads.
- (void) DisconnectNamedPipe (_hPipe);
- EnterCriticalSection (&pipe_instance_lock);
- (void) CloseHandle (_hPipe);
- assert (pipe_instance > 0);
- InterlockedDecrement (&pipe_instance);
- LeaveCriticalSection (&pipe_instance_lock);
- }
- else
- (void) CloseHandle (_hPipe);
-
-#else /* __INSIDE_CYGWIN__ */
-
- assert (!_is_accepted_endpoint);
- (void) ForceCloseHandle (_hPipe);
-
-#endif /* __INSIDE_CYGWIN__ */
-
- _hPipe = NULL;
- }
-}
-
-ssize_t
-transport_layer_pipes::read (void *const buf, const size_t len)
-{
- // verbose: debug_printf ("reading from pipe %p", _hPipe);
-
- assert (_hPipe);
- assert (_hPipe != INVALID_HANDLE_VALUE);
- assert (!_is_listening_endpoint);
-
- DWORD count;
- if (!ReadFile (_hPipe, buf, len, &count, NULL))
- {
- debug_printf ("error reading from pipe (%lu)", GetLastError ());
- SET_ERRNO (EINVAL); // FIXME?
- return -1;
- }
-
- return count;
-}
-
-ssize_t
-transport_layer_pipes::write (void *const buf, const size_t len)
-{
- // verbose: debug_printf ("writing to pipe %p", _hPipe);
-
- assert (_hPipe);
- assert (_hPipe != INVALID_HANDLE_VALUE);
- assert (!_is_listening_endpoint);
-
- DWORD count;
- if (!WriteFile (_hPipe, buf, len, &count, NULL))
- {
- debug_printf ("error writing to pipe, error = %lu", GetLastError ());
- SET_ERRNO (EINVAL); // FIXME?
- return -1;
- }
-
- return count;
-}
-
-/*
- * This routine holds a static variable, assume_cygserver, that is set
- * if the transport has good reason to think that cygserver is
- * running, i.e. if if successfully connected to it with the previous
- * attempt. If this is set, the code tries a lot harder to get a
- * connection, making the assumption that any failures are just
- * congestion and overloading problems.
- */
-
-int
-transport_layer_pipes::connect ()
-{
- assert (!_hPipe);
- assert (!_is_accepted_endpoint);
- assert (!_is_listening_endpoint);
-
- static bool assume_cygserver = false;
-
- BOOL rc = TRUE;
- int retries = 0;
-
- while (rc)
- {
- _hPipe = CreateFile (_pipe_name,
- GENERIC_READ | GENERIC_WRITE,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- &sec_all_nih,
- OPEN_EXISTING,
- SECURITY_IMPERSONATION,
- NULL);
-
- if (_hPipe != INVALID_HANDLE_VALUE)
- {
- assert (_hPipe);
-#ifdef __INSIDE_CYGWIN__
- ProtectHandle (_hPipe);
-#endif
- assume_cygserver = true;
- return 0;
- }
-
- _hPipe = NULL;
-
- if (!assume_cygserver && GetLastError () != ERROR_PIPE_BUSY)
- {
- debug_printf ("Error opening the pipe (%lu)", GetLastError ());
- return -1;
- }
-
- /* Note: `If no instances of the specified named pipe exist, the
- * WaitNamedPipe function returns immediately, regardless of the
- * time-out value.' Thus the explicit Sleep if the call fails
- * with ERROR_FILE_NOT_FOUND.
- */
- while (retries != MAX_WAIT_NAMED_PIPE_RETRY
- && !(rc = WaitNamedPipe (_pipe_name, WAIT_NAMED_PIPE_TIMEOUT)))
- {
- if (GetLastError () == ERROR_FILE_NOT_FOUND)
- Sleep (0); // Give the server a chance.
-
- retries += 1;
- }
- }
-
- assert (retries == MAX_WAIT_NAMED_PIPE_RETRY);
-
- system_printf ("lost connection to cygserver, error = %lu",
- GetLastError ());
-
- assume_cygserver = false;
-
- return -1;
-}
-
-#ifndef __INSIDE_CYGWIN__
-
-bool
-transport_layer_pipes::impersonate_client ()
-{
- assert (_hPipe);
- assert (_hPipe != INVALID_HANDLE_VALUE);
- assert (_is_accepted_endpoint);
-
- if (_hPipe && !ImpersonateNamedPipeClient (_hPipe))
- {
- debug_printf ("Failed to Impersonate client, (%lu)", GetLastError ());
- return false;
- }
-
- return true;
-}
-
-bool
-transport_layer_pipes::revert_to_self ()
-{
- assert (_is_accepted_endpoint);
-
- if (!RevertToSelf ())
- {
- debug_printf ("Failed to RevertToSelf, (%lu)", GetLastError ());
- return false;
- }
- return true;
-}
-
-#endif /* !__INSIDE_CYGWIN__ */
diff --git a/winsup/cygserver/transport_pipes.h b/winsup/cygserver/transport_pipes.h
deleted file mode 100644
index 7265a88..0000000
--- a/winsup/cygserver/transport_pipes.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* transport_pipes.h
-
- Copyright 2001, 2002, 2003 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _TRANSPORT_PIPES_H
-#define _TRANSPORT_PIPES_H
-
-/* Named pipes based transport, for security on NT */
-class transport_layer_pipes : public transport_layer_base
-{
-public:
-#ifndef __INSIDE_CYGWIN__
- virtual int listen ();
- virtual class transport_layer_pipes *accept (bool *recoverable);
-#endif
-
- virtual void close ();
- virtual ssize_t read (void *buf, size_t len);
- virtual ssize_t write (void *buf, size_t len);
- virtual int connect ();
-
-#ifndef __INSIDE_CYGWIN__
- virtual bool impersonate_client ();
- virtual bool revert_to_self ();
-#endif
-
- transport_layer_pipes ();
- virtual ~transport_layer_pipes ();
-
-private:
- const char *const _pipe_name;
- HANDLE _hPipe;
- const bool _is_accepted_endpoint;
- bool _is_listening_endpoint;
-
- transport_layer_pipes (HANDLE hPipe);
-};
-
-#endif /* _TRANSPORT_PIPES_H */
diff --git a/winsup/cygserver/transport_sockets.cc b/winsup/cygserver/transport_sockets.cc
deleted file mode 100644
index d89e343..0000000
--- a/winsup/cygserver/transport_sockets.cc
+++ /dev/null
@@ -1,395 +0,0 @@
-/* transport_sockets.cc
-
- Copyright 2001, 2002, 2003, 2004 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.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. */
-
-/* to allow this to link into cygwin and the .dll, a little magic is needed. */
-#ifdef __OUTSIDE_CYGWIN__
-#include "woutsup.h"
-#else
-#include "winsup.h"
-#endif
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-
-#include <assert.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#include "cygerrno.h"
-#include "transport.h"
-#include "transport_sockets.h"
-
-#ifdef __INSIDE_CYGWIN__
-#define SET_ERRNO(err) set_errno (err)
-#define GET_ERRNO() get_errno ()
-#else
-#define SET_ERRNO(err) errno = (err)
-#define GET_ERRNO() (errno)
-#endif
-
-/* to allow this to link into cygwin and the .dll, a little magic is needed. */
-#ifndef __OUTSIDE_CYGWIN__
-
-extern "C" int cygwin_accept (int fd, struct sockaddr *, int *len);
-extern "C" int cygwin_bind (int fd, const struct sockaddr *, int len);
-extern "C" int cygwin_connect (int fd, const struct sockaddr *, int len);
-extern "C" int cygwin_listen (int fd, int backlog);
-extern "C" int cygwin_shutdown (int fd, int how);
-extern "C" int cygwin_socket (int af, int type, int protocol);
-
-#else /* __OUTSIDE_CYGWIN__ */
-
-#define cygwin_accept(A,B,C) ::accept (A,B,C)
-#define cygwin_bind(A,B,C) ::bind (A,B,C)
-#define cygwin_connect(A,B,C) ::connect (A,B,C)
-#define cygwin_listen(A,B) ::listen (A,B)
-#define cygwin_shutdown(A,B) ::shutdown (A,B)
-#define cygwin_socket(A,B,C) ::socket (A,B,C)
-
-#endif /* __OUTSIDE_CYGWIN__ */
-
-enum
- {
- MAX_CONNECT_RETRY = 64
- };
-
-transport_layer_sockets::transport_layer_sockets (const int fd)
- : _fd (fd),
- _addr_len (0),
- _is_accepted_endpoint (true),
- _is_listening_endpoint (false)
-{
- assert (_fd != -1);
-
- memset (&_addr, '\0', sizeof (_addr));
-}
-
-transport_layer_sockets::transport_layer_sockets ()
- : _fd (-1),
- _addr_len (0),
- _is_accepted_endpoint (false),
- _is_listening_endpoint (false)
-{
- memset (&_addr, '\0', sizeof (_addr));
-
- _addr.sun_family = AF_UNIX;
- strcpy (_addr.sun_path, "/tmp/cygdaemo"); // FIXME: $TMP?
- _addr_len = SUN_LEN (&_addr);
-}
-
-transport_layer_sockets::~transport_layer_sockets ()
-{
- close ();
-}
-
-#ifndef __INSIDE_CYGWIN__
-
-int
-transport_layer_sockets::listen ()
-{
- assert (_fd == -1);
- assert (!_is_accepted_endpoint);
- assert (!_is_listening_endpoint);
-
- debug_printf ("listen () [this = %p]", this);
-
- struct stat sbuf;
-
- if (stat (_addr.sun_path, &sbuf) == -1)
- {
- if (GET_ERRNO () != ENOENT)
- {
- system_printf ("cannot access socket file `%s': %s",
- _addr.sun_path, strerror (GET_ERRNO ()));
- return -1;
- }
- }
- else if (S_ISSOCK (sbuf.st_mode))
- {
- // The socket already exists: is a duplicate cygserver running?
-
- const int newfd = cygwin_socket (AF_UNIX, SOCK_STREAM, 0);
-
- if (newfd == -1)
- {
- system_printf ("failed to create UNIX domain socket: %s",
- strerror (GET_ERRNO ()));
- return -1;
- }
-
- if (cygwin_connect (newfd, (struct sockaddr *) &_addr, _addr_len) == 0)
- {
- system_printf ("the daemon is already running");
- (void) cygwin_shutdown (newfd, SHUT_WR);
- char buf[BUFSIZ];
- while (::read (newfd, buf, sizeof (buf)) > 0)
- {}
- (void) ::close (newfd);
- return -1;
- }
-
- if (unlink (_addr.sun_path) == -1)
- {
- system_printf ("failed to remove `%s': %s",
- _addr.sun_path, strerror (GET_ERRNO ()));
- (void) ::close (newfd);
- return -1;
- }
- }
- else
- {
- system_printf ("cannot create socket `%s': File already exists",
- _addr.sun_path);
- return -1;
- }
-
- _fd = cygwin_socket (AF_UNIX, SOCK_STREAM, 0);
-
- if (_fd == -1)
- {
- system_printf ("failed to create UNIX domain socket: %s",
- strerror (GET_ERRNO ()));
- return -1;
- }
-
- if (cygwin_bind (_fd, (struct sockaddr *) &_addr, _addr_len) == -1)
- {
- const int saved_errno = GET_ERRNO ();
- close ();
- SET_ERRNO (saved_errno);
- system_printf ("failed to bind UNIX domain socket `%s': %s",
- _addr.sun_path, strerror (GET_ERRNO ()));
- return -1;
- }
-
- _is_listening_endpoint = true; // i.e. this really means "have bound".
-
- if (cygwin_listen (_fd, SOMAXCONN) == -1)
- {
- const int saved_errno = GET_ERRNO ();
- close ();
- SET_ERRNO (saved_errno);
- system_printf ("failed to listen on UNIX domain socket `%s': %s",
- _addr.sun_path, strerror (GET_ERRNO ()));
- return -1;
- }
-
- debug_printf ("0 = listen () [this = %p, fd = %d]", this, _fd);
-
- return 0;
-}
-
-class transport_layer_sockets *
-transport_layer_sockets::accept (bool *const recoverable)
-{
- assert (_fd != -1);
- assert (!_is_accepted_endpoint);
- assert (_is_listening_endpoint);
-
- debug_printf ("accept () [this = %p, fd = %d]", this, _fd);
-
- struct sockaddr_un client_addr;
- socklen_t client_addr_len = sizeof (client_addr);
-
- const int accept_fd =
- cygwin_accept (_fd, (struct sockaddr *) &client_addr, &client_addr_len);
-
- if (accept_fd == -1)
- {
- system_printf ("failed to accept connection: %s", strerror (GET_ERRNO ()));
- switch (GET_ERRNO ())
- {
- case ECONNABORTED:
- case EINTR:
- case EMFILE:
- case ENFILE:
- case ENOBUFS:
- case ENOMEM:
- *recoverable = true;
- break;
-
- default:
- *recoverable = false;
- break;
- }
- return NULL;
- }
-
- debug_printf ("%d = accept () [this = %p, fd = %d]", accept_fd, this, _fd);
-
- return new transport_layer_sockets (accept_fd);
-}
-
-#endif /* !__INSIDE_CYGWIN__ */
-
-void
-transport_layer_sockets::close ()
-{
- debug_printf ("close () [this = %p, fd = %d]", this, _fd);
-
- if (_is_listening_endpoint)
- (void) unlink (_addr.sun_path);
-
- if (_fd != -1)
- {
- (void) cygwin_shutdown (_fd, SHUT_WR);
- if (!_is_listening_endpoint)
- {
- char buf[BUFSIZ];
- while (::read (_fd, buf, sizeof (buf)) > 0)
- {}
- }
- (void) ::close (_fd);
- _fd = -1;
- }
-
- _is_listening_endpoint = false;
-}
-
-ssize_t
-transport_layer_sockets::read (void *const buf, const size_t buf_len)
-{
- assert (_fd != -1);
- assert (!_is_listening_endpoint);
-
- assert (buf);
- assert (buf_len > 0);
-
- // verbose: debug_printf ("read (buf = %p, len = %u) [this = %p, fd = %d]",
- // buf, buf_len, this, _fd);
-
- char *read_buf = static_cast<char *> (buf);
- size_t read_buf_len = buf_len;
- ssize_t res = 0;
-
- while (read_buf_len != 0
- && (res = ::read (_fd, read_buf, read_buf_len)) > 0)
- {
- read_buf += res;
- read_buf_len -= res;
-
- assert (read_buf_len >= 0);
- }
-
- if (res != -1)
- {
- if (res == 0)
- SET_ERRNO (EIO); // FIXME?
-
- res = buf_len - read_buf_len;
- }
-
- if (res != static_cast<ssize_t> (buf_len))
- debug_printf ("%d = read (buf = %p, len = %u) [this = %p, fd = %d]: %s",
- res, buf, buf_len, this, _fd,
- (res == -1 ? strerror (GET_ERRNO ()) : "EOF"));
- else
- {
- // verbose: debug_printf ("%d = read (buf = %p, len = %u) [this = %p, fd = %d]",
- // res, buf, buf_len, this, _fd);
- }
-
- return res;
-}
-
-ssize_t
-transport_layer_sockets::write (void *const buf, const size_t buf_len)
-{
- assert (_fd != -1);
- assert (!_is_listening_endpoint);
-
- assert (buf);
- assert (buf_len > 0);
-
- // verbose: debug_printf ("write (buf = %p, len = %u) [this = %p, fd = %d]",
- // buf, buf_len, this, _fd);
-
- char *write_buf = static_cast<char *> (buf);
- size_t write_buf_len = buf_len;
- ssize_t res = 0;
-
- while (write_buf_len != 0
- && (res = ::write (_fd, write_buf, write_buf_len)) > 0)
- {
- write_buf += res;
- write_buf_len -= res;
-
- assert (write_buf_len >= 0);
- }
-
- if (res != -1)
- {
- if (res == 0)
- SET_ERRNO (EIO); // FIXME?
-
- res = buf_len - write_buf_len;
- }
-
- if (res != static_cast<ssize_t> (buf_len))
- debug_printf ("%d = write (buf = %p, len = %u) [this = %p, fd = %d]: %s",
- res, buf, buf_len, this, _fd,
- (res == -1 ? strerror (GET_ERRNO ()) : "EOF"));
- else
- {
- // verbose: debug_printf ("%d = write (buf = %p, len = %u) [this = %p, fd = %d]",
- // res, buf, buf_len, this, _fd);
- }
-
- return res;
-}
-
-int
-transport_layer_sockets::connect ()
-{
- assert (_fd == -1);
- assert (!_is_accepted_endpoint);
- assert (!_is_listening_endpoint);
-
- static bool assume_cygserver = false;
-
- debug_printf ("connect () [this = %p]", this);
-
- for (int retries = 0; retries != MAX_CONNECT_RETRY; retries++)
- {
- _fd = cygwin_socket (AF_UNIX, SOCK_STREAM, 0);
-
- if (_fd == -1)
- {
- system_printf ("failed to create UNIX domain socket: %s",
- strerror (GET_ERRNO ()));
- return -1;
- }
-
- if (cygwin_connect (_fd, (struct sockaddr *) &_addr, _addr_len) == 0)
- {
- assume_cygserver = true;
- debug_printf ("0 = connect () [this = %p, fd = %d]", this, _fd);
- return 0;
- }
-
- if (!assume_cygserver || GET_ERRNO () != ECONNREFUSED)
- {
- debug_printf ("failed to connect to server: %s", strerror (GET_ERRNO ()));
- (void) ::close (_fd);
- _fd = -1;
- return -1;
- }
-
- (void) ::close (_fd);
- _fd = -1;
- Sleep (0); // Give the server a chance.
- }
-
- debug_printf ("failed to connect to server: %s", strerror (GET_ERRNO ()));
- return -1;
-}
diff --git a/winsup/cygserver/transport_sockets.h b/winsup/cygserver/transport_sockets.h
deleted file mode 100644
index dab086e..0000000
--- a/winsup/cygserver/transport_sockets.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* transport_sockets.h
-
- Copyright 2001, 2002, 2003 Red Hat Inc.
-
- Written by Robert Collins <rbtcollins@hotmail.com>
-
-This file is part of Cygwin.
-
-This software is a copyrighted work licensed under the terms of the
-Cygwin license. Please consult the file "CYGWIN_LICENSE" for
-details. */
-
-#ifndef _TRANSPORT_SOCKETS_H
-#define _TRANSPORT_SOCKETS_H
-
-#include <sys/socket.h>
-#include <sys/un.h>
-
-class transport_layer_sockets : public transport_layer_base
-{
-public:
-#ifndef __INSIDE_CYGWIN__
- virtual int listen ();
- virtual class transport_layer_sockets *accept (bool *recoverable);
-#endif
-
- virtual void close ();
- virtual ssize_t read (void *buf, size_t len);
- virtual ssize_t write (void *buf, size_t len);
- virtual int connect ();
-
- transport_layer_sockets ();
- virtual ~transport_layer_sockets ();
-
-private:
- /* for socket based communications */
- int _fd;
- struct sockaddr_un _addr;
- socklen_t _addr_len;
- const bool _is_accepted_endpoint;
- bool _is_listening_endpoint;
-
- transport_layer_sockets (int fd);
-};
-
-#endif /* _TRANSPORT_SOCKETS_H */
diff --git a/winsup/cygserver/woutsup.h b/winsup/cygserver/woutsup.h
deleted file mode 100644
index 39db639..0000000
--- a/winsup/cygserver/woutsup.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* woutsup.h: for Cygwin code compiled outside the DLL (i.e. cygserver).
-
- Copyright 2002, 2003 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 _MT_SAFE 1
-
-#ifdef __INSIDE_CYGWIN__
-#error "woutsup.h is not for code being compiled inside the dll"
-#endif
-
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
-#endif
-
-#if _WIN32_WINNT < 0x0500
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
-#endif
-
-#define WIN32_LEAN_AND_MEAN 1
-#define _WINGDI_H
-#define _WINUSER_H
-#define _WINNLS_H
-#define _WINVER_H
-#define _WINNETWK_H
-#define _WINSVC_H
-#include <windows.h>
-#include <wincrypt.h>
-#include <lmcons.h>
-#undef _WINGDI_H
-#undef _WINUSER_H
-#undef _WINNLS_H
-#undef _WINVER_H
-#undef _WINNETWK_H
-#undef _WINSVC_H
-
-#include "wincap.h"
-
-#include "bsd_helper.h"
-#include "bsd_log.h"
-#include "bsd_mutex.h"
-
-/* The one function we use from winuser.h most of the time */
-extern "C" DWORD WINAPI GetLastError (void);
-
-extern int cygserver_running;
-
-#define SIGHANDLE(SIG) \
- do \
- { \
- struct sigaction act; \
- \
- act.sa_handler = &handle_signal; \
- act.sa_mask = 0; \
- act.sa_flags = 0; \
- \
- if (sigaction (SIG, &act, NULL) == -1) \
- { \
- panic ("failed to install handler for " #SIG ": %s", \
- strerror (errno)); \
- exit (1); \
- } \
- } while (false)
-
-#define debug_printf(f,...) debug((f),##__VA_ARGS__)
-#define syscall_printf(f,...) log(LOG_ERR,(f),##__VA_ARGS__)
-#define system_printf(f,...) log(LOG_ERR,(f),##__VA_ARGS__)